aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/network-functions
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2001-06-29 22:18:09 +0000
committerBill Nottingham <notting@redhat.com>2001-06-29 22:18:09 +0000
commitf1a7234440ef762a3f659fe3c6dc4f5bfe8234f1 (patch)
tree0e8eea09ea33b85528acce0e052ea3371b515c25 /sysconfig/network-scripts/network-functions
parent09f3739f065703adf268e1d6df48556b430a9dd5 (diff)
downloadinitscripts-f1a7234440ef762a3f659fe3c6dc4f5bfe8234f1.tar
initscripts-f1a7234440ef762a3f659fe3c6dc4f5bfe8234f1.tar.gz
initscripts-f1a7234440ef762a3f659fe3c6dc4f5bfe8234f1.tar.bz2
initscripts-f1a7234440ef762a3f659fe3c6dc4f5bfe8234f1.tar.xz
initscripts-f1a7234440ef762a3f659fe3c6dc4f5bfe8234f1.zip
run more stuff with C locale, mark some more strings for translation
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r--sysconfig/network-scripts/network-functions16
1 files changed, 8 insertions, 8 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 0b7f3afd..fef6259d 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -9,7 +9,7 @@ source_config ()
PARENTCONFIG=`echo $CONFIG | sed 's/-[^-]*$//g'`
PARENTDEVNAME=`basename $PARENTCONFIG | sed 's/^ifcfg-//g'`
[ -f $PARENTCONFIG ] || {
- echo "Missing config file $PARENTCONFIG." >&2
+ echo $"Missing config file $PARENTCONFIG." >&2
exit 1
}
. $PARENTCONFIG
@@ -66,13 +66,13 @@ set_hostname()
check_device_down ()
{
if echo $1 | grep -q ':' ; then
- if LANG=C ifconfig -a 2>/dev/null | grep -q $1 ; then
+ if LC_ALL=C ifconfig -a 2>/dev/null | grep -q $1 ; then
retcode=1
else
retcode=0
fi
else
- if LANG=C ip -o link ls dev $1 2>/dev/null | grep ",UP" >/dev/null 2>&1 ; then
+ if LC_ALL=C ip -o link ls dev $1 2>/dev/null | grep ",UP" >/dev/null 2>&1 ; then
retcode=1
else
retcode=0
@@ -84,7 +84,7 @@ check_device_down ()
check_link_down ()
{
if [ -x /sbin/mii-tool ]; then
- output=`/sbin/mii-tool $1 2>&1`
+ output=`LC_ALL=C /sbin/mii-tool $1 2>&1`
if echo $output | grep -q "Operation not supported"; then
return 1
elif echo $output | grep -q "link ok"; then
@@ -98,7 +98,7 @@ check_link_down ()
check_default_route ()
{
- ip route | grep -q default
+ LC_ALL=C ip route | grep -q default
}
find_gateway_dev ()
@@ -106,9 +106,9 @@ find_gateway_dev ()
. /etc/sysconfig/network
if [ "${GATEWAY}" != "" -a "${GATEWAY}" != "none" ] ; then
export GATEWAY
- networks=`/sbin/route -n|awk '{print $1, ENVIRON["GATEWAY"],$3,$8}'|awk '{system("ipcalc --silent --network "$2" "$3" 2>/dev/null")}'|sed s^NETWORK=^^g`
+ networks=`LC_ALL=C /sbin/route -n|awk '{print $1, ENVIRON["GATEWAY"],$3,$8}'|awk '{system("ipcalc --silent --network "$2" "$3" 2>/dev/null")}'|sed s^NETWORK=^^g`
for net in $networks; do
- dev=`/sbin/route -n|grep ^$net|awk '{print $NF}'`
+ dev=`LC_ALL=C /sbin/route -n|grep ^$net|awk '{print $NF}'`
if [ "$dev" != "" ] ; then
GATEWAYDEV=$dev
fi
@@ -134,7 +134,7 @@ add_default_route ()
is_wireless_device ()
{
if [ -x /sbin/iwconfig ]; then
- iwconfig $1 2>&1 | grep -q "no wireless extensions" || return 0
+ LC_ALL=C iwconfig $1 2>&1 | grep -q "no wireless extensions" || return 0
fi
return 1
}