Hi, after all, Gentoo is all about choice. So if anyone is keen enough to set his root- respectively boot-environment to some locale, then he should not get a bleedy nose (who didn't try that yet? ;-), e.g. with the newly introduced function ifconfig_is_ethernet: somewhere ~ $ LC_ALL=de_DE /sbin/ifconfig eth0 eth0 Protokoll:Ethernet Hardware Adresse 00:11:11:09:A3:36 ... (my locales for fr_FR, jp_*, cn_* a be incomplete:) that output would not match the newly-introduced function ifconfig_is_ethernet: # Return 0 if the link is ethernet, otherwise 1. ifconfig_is_ethernet() { ifconfig "$1" | grep -q "^$1[[:space:]]*Link encap:Ethernet[[:space:]]" } In my opinion, scripts or functions that do depend on a certain piece of text or format of output should set up a local environment for the programs producing the output that will be parsed, to ensure it will work everywhere (with all locales). Only one locale might be expected to be available everywhere: C (and maybe POSIX in the future), which I'm trying to use everywhere, where I have to parse some program's textual output, e.g.: ifconfig_is_ethernet() { LC_ALL=C ifconfig "$1" | grep -q "^$1[[:space:]]*Link encap:Ethernet[[:space:]]" } Localized boot messages would hurt a little bit less then... ;-) Kind regards, Dominik
forcing LC_ALL globally would prevent localized boot messages (which we've started to do in trunk baselayout) when code needs to grok the output of something, it should force LC_ALL=C
Yes, LC_ALL=C my_command_producing_output | commands_using_output was what I meant, not setting LC_ALL in global context.
If you look at the top of the ifconfig module you'll see that we alias ifconfig into LC_ALL=C /sbin/ifconfig, so all internal calls to ifconfig are prefixed with LC_ALL=C.