|
Bugzilla – Full Text Bug Listing |
| Summary: | /etc/init.d/network: touch `date`: Problem if LANG != "C" | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE LINUX 10.0 | Reporter: | Tobias Burnus <burnus> |
| Component: | Basesystem | Assignee: | Lars Müller <lmuelle> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Minor | ||
| Priority: | P5 - None | CC: | samba-maintainers |
| Version: | Beta 2 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | All | ||
| Whiteboard: | |||
| Found By: | Other | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Tobias Burnus
2005-08-17 20:37:53 UTC
fixed Gerald Carter, member of the Samba Team asked: Why does SuSE set these lines in /etc/rc.status # Do _not_ be fooled by non POSIX locale LC_ALL=POSIX xport LC_ALL We're having some problems with is resulting in smbd not running with a UTF-8 charset and is breaking creating printers with extended characters in the name. Werner or Mike: Should we get LANG from /etc/sysconfig/language and export it before we start smbd and unset it after? This depends on the requirement of the samba people. If you need this than do this. The allmost other boot scripts do require POSIX for LANG. Lars> Should we get LANG from /etc/sysconfig/language and export it
Lars> before we start smbd
In the /etc/init.d/kbd script, I used:
test -e /etc/profile.d/lang.sh && . /etc/profile.d/lang.sh
LOCALE_CHARMAP=`locale charmap`
LC_ALL=POSIX
This will work only if ROOT_USES_LANG="ctype" or "yes".
If ROOT_USES_LANG="no", it will not work because then
. /etc/profile.d/lang.sh
will not even set LC_CTYPE.
According to comment #2 it looks like you need only the charmap of the
locale, i.e. sourcing /etc/profile.d/lang.sh should be enough unless
somebody sets ROOT_USES_LANG="no"
If ROOT_USES_LANG="yes", sourcing /etc/profile/lang.sh will give you
the same locale as for regular (non-root) users.
If you don't want to depend on the setting of ROOT_USES_LANG
you have to source /etc/sysconfig/language and use
at the values of RC_*.
For example:
. /etc/sysconfig/language
export LANG=$RC_LANG
export LC_ALL=$RC_LC_ALL
export LC_MESSAGES=$RC_LC_MESSAGES
...
do something which needs correct locale settings
unset LANG
unset LC_ALL
unset LC_MESSAGES
...
Lars> and unset it after?
This depends on what you do in the smbd start script.
Are you parsing any output which might break if it comes in
a different language? Do you depend on a certain sorting order
when parsing output?
If you do such stuff, better use LC_ALL=POSIX to make sure
that your parser doesn't break. If not, it doesn't matter.
Fixed with next Samba package. And thanks Werner and Mike. |