aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/network
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-01-07 04:58:31 +0000
committerBill Nottingham <notting@redhat.com>2003-01-07 04:58:31 +0000
commit3061c823c0566c5efeefae12d48d4bb95c2acc7a (patch)
tree28a7d440413737f252d2afd4052920af67f09741 /rc.d/init.d/network
parent52475e10f05f0f29437bce4ccf2d2d7560ead764 (diff)
downloadinitscripts-3061c823c0566c5efeefae12d48d4bb95c2acc7a.tar
initscripts-3061c823c0566c5efeefae12d48d4bb95c2acc7a.tar.gz
initscripts-3061c823c0566c5efeefae12d48d4bb95c2acc7a.tar.bz2
initscripts-3061c823c0566c5efeefae12d48d4bb95c2acc7a.tar.xz
initscripts-3061c823c0566c5efeefae12d48d4bb95c2acc7a.zip
speedups (<drepper@redhat.com>)
- use LC_ALL=C - don't use both grep&awk on the same file, just use awk
Diffstat (limited to 'rc.d/init.d/network')
-rwxr-xr-xrc.d/init.d/network8
1 files changed, 4 insertions, 4 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index 364b5567..55d5c111 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -86,7 +86,7 @@ case "$1" in
# bring up all other interfaces configured to come up at boot time
for i in $interfaces; do
- eval $(fgrep "DEVICE=" ifcfg-$i)
+ eval $(LANG=C fgrep "DEVICE=" ifcfg-$i)
if [ -z "$DEVICE" ] ; then DEVICE="$i"; fi
if [ "${DEVICE##cipcb}" != "$DEVICE" ] ; then
@@ -166,9 +166,9 @@ case "$1" in
# and unmount them even if the user didn't turn on netfs
if [ "$RUNLEVEL" = "6" -o "$RUNLEVEL" = "0" -o "$RUNLEVEL" = "1" ]; then
- NFSMTAB=`grep -v '^#' /proc/mounts | awk '{ if ($3 ~ /^nfs$/ ) print $2}'`
- SMBMTAB=`grep -v '^#' /proc/mounts | awk '{ if ($3 ~ /^smbfs$/ ) print $2}'`
- NCPMTAB=`grep -v '^#' /proc/mounts | awk '{ if ($3 ~ /^ncpfs$/ ) print $2}'`
+ NFSMTAB=`LC_ALL=C awk '!/^#/ && $3 == "nfs" { print $2 }' /proc/mounts`
+ SMBMTAB=`LC_ALL=C awk '!/^#/ && $3 == "smbfs" { print $2 }' /proc/mounts`
+ NCPMTAB=`LC_ALL=C awk '!/^#/ && $3 == "ncpfs" { print $2 }' /proc/mounts`
if [ -n "$NFSMTAB" -o -n "$SMBMTAB" -o -n "$NCPMTAB" ] ; then
/etc/init.d/netfs stop
fi