aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsysconfig/network-scripts/ifup6
-rwxr-xr-xsysconfig/network-scripts/ifup-aliases2
-rw-r--r--sysconfig/network-scripts/network-functions16
-rw-r--r--sysconfig/network-scripts/network-functions-ipv64
4 files changed, 14 insertions, 14 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 25e24860..670db6ef 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -89,7 +89,7 @@ fi
# is this device available? (this catches PCMCIA devices for us)
LC_ALL= LANG= ip -o link | grep -q ${REALDEVICE}
if [ "$?" = "1" ]; then
- modprobe -c | grep -q ${REALDEVICE} && modprobe ${REALDEVICE} || {
+ LC_ALL=C modprobe -c | grep -q ${REALDEVICE} && modprobe ${REALDEVICE} || {
echo $"Device does not seem to be present, delaying ${DEVICE} initialization."
exit 1
}
@@ -149,7 +149,7 @@ if [ -n "${DYNCONFIG}" ]; then
fi
echo -n $"Determining IP information for ${DEVICE}..."
if check_link_down ${DEVICE}; then
- echo " failed; no link present. Check cable?"
+ echo $" failed; no link present. Check cable?"
exit 1
fi
@@ -209,7 +209,7 @@ else
fi
- if ! ip addr ls ${DEVICE} | grep -q "${IPADDR}/${PREFIX}" ; then
+ if ! LC_ALL=C ip addr ls ${DEVICE} | grep -q "${IPADDR}/${PREFIX}" ; then
if ! ip addr add ${IPADDR}/${PREFIX} \
brd ${BROADCAST:-+} dev ${DEVICE} ; then
echo $"Error adding address ${IPADDR} for ${DEVICE}."
diff --git a/sysconfig/network-scripts/ifup-aliases b/sysconfig/network-scripts/ifup-aliases
index 1ba0a5e5..84d37200 100755
--- a/sysconfig/network-scripts/ifup-aliases
+++ b/sysconfig/network-scripts/ifup-aliases
@@ -266,7 +266,7 @@ function new_interface ()
if [ "${GATEWAY}" != "" ]; then
if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then
# set up default gateway, if it isn't already there
- CURGW=`route -n | grep ^0\.0\.0\.0 | awk '{ print $2 }'`
+ CURGW=`LC_ALL=C route -n | grep ^0\.0\.0\.0 | awk '{ print $2 }'`
if [ "$CURGW" != "$GATEWAY" ]; then
route add default gw ${GATEWAY} ${DEVICE}
fi
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
}
diff --git a/sysconfig/network-scripts/network-functions-ipv6 b/sysconfig/network-scripts/network-functions-ipv6
index 4ae37ab8..f9f87d29 100644
--- a/sysconfig/network-scripts/network-functions-ipv6
+++ b/sysconfig/network-scripts/network-functions-ipv6
@@ -359,7 +359,7 @@ function ifdown_ipv6_tunnel() {
# Set up a tunnel
- output="`route -A inet6 del $routeipv6 gw ::$addressipv4tunnel dev sit0 2>&1`"
+ output="`LC_ALL=C route -A inet6 del $routeipv6 gw ::$addressipv4tunnel dev sit0 2>&1`"
if [ $? -ne 0 ]; then
if echo $output | grep -i -q 'SIOCDELRT: No such process'; then
true
@@ -423,7 +423,7 @@ function test_ipv6_addrs_exists () {
if [ "$EXISTS_ipv6calc" = "yes" ]; then
# Using ipv6calc and compare against /proc/net/if_inet6
- convertresult="`ipv6calc --addr2if_inet6 $testaddr/$testprefix`"
+ convertresult="`LC_ALL=C ipv6calc --addr2if_inet6 $testaddr/$testprefix`"
# Split in address, scope and prefix length
test_addr="`echo $convertresult | awk '{ print $1 }'`"
test_scope="`echo $convertresult | awk '{ print $2 }'`"