From baad3148be771e6faccfeac553d847a4f9669ac4 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 28 Mar 2001 16:22:38 +0000 Subject: run *all* greps in C locale --- rc.d/init.d/network | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'rc.d') diff --git a/rc.d/init.d/network b/rc.d/init.d/network index 5ea63b7d..9d435c92 100755 --- a/rc.d/init.d/network +++ b/rc.d/init.d/network @@ -42,13 +42,15 @@ cd /etc/sysconfig/network-scripts # find all the interfaces besides loopback. # ignore aliases, alternative configurations, and editor backup files -interfaces=`ls ifcfg* | egrep -v '(ifcfg-lo|:|rpmsave|rpmorig|rpmnew)' | \ - egrep -v '(~|\.bak)$' | \ - egrep -v 'ifcfg-cipcb[0-9]+$' | \ - egrep -v 'ifcfg-ippp[0-9]+$' | \ - egrep 'ifcfg-[a-z0-9]+$' | \ +interfaces=`ls ifcfg* | LANG=C egrep -v '(ifcfg-lo|:|rpmsave|rpmorig|rpmnew)' | \ + LANG=C egrep -v '(~|\.bak)$' | \ + LANG=C egrep -v 'ifcfg-cipcb[0-9]+$' | \ + LANG=C egrep -v 'ifcfg-ippp[0-9]+$' | \ + LANG=C egrep 'ifcfg-[a-z0-9]+$' | \ sed 's/^ifcfg-//g'` +export LANG=$OLDLANG + # See how we were called. case "$1" in start) @@ -71,7 +73,7 @@ case "$1" in sysctl -w kernel.hotplug="/bin/true" > /dev/null 2>&1 for i in $interfaces; do - if egrep -L "^ONBOOT=\"?[Nn][Oo]\"?" ifcfg-$i >/dev/null 2>&1 ; then + if LANG=C egrep -L "^ONBOOT=\"?[Nn][Oo]\"?" ifcfg-$i >/dev/null 2>&1 ; then if [ "${i##eth}" != "$i" ]; then # Probe module to preserve interface ordering if [ -n "`modprobe -vn $i | grep -v Note:`" ]; then @@ -101,12 +103,12 @@ case "$1" in done # add cipe here. - cipeinterfaces=`ls ifcfg* | egrep -v '(ifcfg-lo|:|rpmsave|rpmorig|rpmnew)' | \ - egrep -v '(~|\.bak)$' | \ - egrep 'ifcfg-cipcb[0-9]+$' | \ + cipeinterfaces=`ls ifcfg* | LANG=C egrep -v '(ifcfg-lo|:|rpmsave|rpmorig|rpmnew)' | \ + LANG=C egrep -v '(~|\.bak)$' | \ + LANG=C egrep 'ifcfg-cipcb[0-9]+$' | \ sed 's/^ifcfg-//g'` for i in $cipeinterfaces ; do - if ! egrep -L "^ONBOOT=\"?[Nn][Oo]\"?" ifcfg-$i >/dev/null 2>&1 ; then + if ! LANG=C egrep -L "^ONBOOT=\"?[Nn][Oo]\"?" ifcfg-$i >/dev/null 2>&1 ; then # If we're in confirmation mode, get user confirmation [ -n "$CONFIRM" ] && { -- cgit v1.2.1