aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2001-03-28 16:22:38 +0000
committerBill Nottingham <notting@redhat.com>2001-03-28 16:22:38 +0000
commitbaad3148be771e6faccfeac553d847a4f9669ac4 (patch)
treeef2c46e3934299df8f1b3948cc406222e7d66ff2
parent8c088b1144d92862727f7e42ab004ac6010ff8da (diff)
downloadinitscripts-baad3148be771e6faccfeac553d847a4f9669ac4.tar
initscripts-baad3148be771e6faccfeac553d847a4f9669ac4.tar.gz
initscripts-baad3148be771e6faccfeac553d847a4f9669ac4.tar.bz2
initscripts-baad3148be771e6faccfeac553d847a4f9669ac4.tar.xz
initscripts-baad3148be771e6faccfeac553d847a4f9669ac4.zip
run *all* greps in C locale
-rwxr-xr-xrc.d/init.d/network22
1 files changed, 12 insertions, 10 deletions
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" ] &&
{