Bug 81494 - apmscript does not restart network interfaces on non-english locales
Summary: apmscript does not restart network interfaces on non-english locales
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: apmd
Version: 8.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Jay Turner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-01-09 22:15 UTC by Sergey V. Udaltsov
Modified: 2015-01-08 00:02 UTC (History)
4 users (show)

Fixed In Version: 3.0.2-19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-05-18 23:49:22 UTC


Attachments (Terms of Use)

Description Sergey V. Udaltsov 2003-01-09 22:15:17 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.3.1 (X11; Linux i686; U;) Gecko/20021204

Description of problem:
There is a line:

NETDEVICES=`service network status |grep -A1 "Currently active devices" |tail -n1`

After than $NETDEVICES is used to reconfigure interfaces

This line does not work for non-english locales - because "Currently active
devices" is localized in /etc/rc.d/init.d/network.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
Put LANG=ru_RU.UTF-8 into /etc/sysconfig/i18n, suspend and resume the computer.
    

Actual Results:  Interface lo is down

Expected Results:  Interface lo should be up

Additional info:

Comment 1 Bill Nottingham 2003-02-21 01:13:19 UTC
This is fixed in 3.0.2-16.

Comment 2 Sergey V. Udaltsov 2003-04-14 09:57:41 UTC
In RH9 - still an issue. Even all these LC_ALL and LANG settings do not help.
The reason is that apmscript calls /etc/init.d/network. This bash script creates
new bash instance which calls /etc/bashrc which calls all these /etc/profile.d
scripts (incluging lang.sh) so ...

The only way for me was to modify /etc/init.d/network (remove '$' character
before status messages. Bad but it works...

Comment 3 Rupert Pupkin 2003-05-14 16:13:38 UTC
I think the problem is that /etc/init.d/network calls /etc/init.d/functions,
which in turn calls /etc/sysconfig/i18n, giving you nice localized status
messages :( 

But /etc/sysconfig/i18n will only be called if $NOLOCALE is not set. So the lines 

NOLOCALE=1
export NOLOCALE

in the script /etc/sysconfig/apm-scripts/apmscript right after the line 

LANG="C"

did the trick for me. I didn't have to modify /etc/init.d/network.

Comment 4 Bill Nottingham 2003-05-18 23:49:22 UTC
Makes sense, will be in 3.0.2-19.


Note You need to log in before you can comment on or make changes to this bug.