Bug 751 - Detection of network interfaces fail because of wrong locales
Summary: Detection of network interfaces fail because of wrong locales
Status: RESOLVED FIXED
Alias: None
Product: LTSP
Classification: Unclassified
Component: ltspcfg (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Jim McQuillan
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-14 12:07 UTC by francis giraldeau
Modified: 2004-06-25 15:41 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description francis giraldeau 2004-06-14 12:07:37 UTC
When I run the script ltspcfg, there are error messages that indicates the use
of uninitialized values. This is because my locales are in french and paterns
does not match my ifconfig output.

This is a patch to resove this problem.

--- ltspcfg     2004-06-14 14:51:44.000000000 -0400
+++ ltspcfg.new 2004-06-14 14:52:54.000000000 -0400
@@ -375,8 +375,21 @@
                                                                               
                     
     my @interfaces;                          # An array to hold the interfaces
     splice( @interfaces, 0 );                # Make sure it is empty
-
-    open FH, "LANG=C ifconfig -a |" or die "Unable to run ifconfig: $!";
+
+    #
+    # Fix locales problem with other languages
+    #
+    $ENV{LANG} = "en_US";
+    #$ENV{LC_ALL} = "en_US";
+    $ENV{LANGUAGE} = "en_US:en";
+    $ENV{LC_COLLATE} = "en_US";
+    $ENV{LC_CTYPE} = "en_US";
+    $ENV{LC_MESSAGES} = "en_US";
+    $ENV{LC_MONETARY} = "en_US";
+    $ENV{LC_NUMERIC} = "en_US";
+    $ENV{LC_TIME} = "en_US";
+
+    open FH, "ifconfig -a |" or die "Unable to run ifconfig: $!";
                                                                               
                     
     while(<FH>){
       chomp;                                 # Get rid of the trailing newline
Comment 1 Jim McQuillan 2004-06-26 08:41:49 UTC
I've added the changes to ltspcfg. This will go in the next release of ltspcfg,
which will be part of the ltsp-4.1 ltsp-utils package.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.