aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-04-15 19:49:04 +0000
committerBill Nottingham <notting@redhat.com>2005-04-15 19:49:04 +0000
commite0cc0012518e81e3bad190c50876fda0d7abea4e (patch)
tree6bbf4188c777df54904e46e763263acfb87b9a6d /rc.d/init.d
parentc4681d38ee267a8f769fa459a837c8f683863605 (diff)
downloadinitscripts-e0cc0012518e81e3bad190c50876fda0d7abea4e.tar
initscripts-e0cc0012518e81e3bad190c50876fda0d7abea4e.tar.gz
initscripts-e0cc0012518e81e3bad190c50876fda0d7abea4e.tar.bz2
initscripts-e0cc0012518e81e3bad190c50876fda0d7abea4e.tar.xz
initscripts-e0cc0012518e81e3bad190c50876fda0d7abea4e.zip
optimize some (#138557, <drepper@redhat.com>)
Diffstat (limited to 'rc.d/init.d')
-rwxr-xr-xrc.d/init.d/network11
1 files changed, 6 insertions, 5 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index f63f3bd6..42a69891 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -43,11 +43,12 @@ cd /etc/sysconfig/network-scripts
# find all the interfaces besides loopback.
# ignore aliases, alternative configurations, and editor backup files
-interfaces=`ls ifcfg* | LANG=C egrep -v '(ifcfg-lo|:|-range|rpmsave|rpmorig|rpmnew)' | \
- LANG=C egrep -v '(~|\.bak)$' | \
- LANG=C egrep 'ifcfg-[A-Za-z0-9\._-]+$' | \
- sed 's/^ifcfg-//g' |
- sed 's/[0-9]/ &/' | LANG=C sort -k 1,1 -k 2n | sed 's/ //'`
+interfaces=`ls ifcfg* | \
+ LANG=C sed -e '/\(ifcfg-lo\|rpmsave\|:\|rpmorig\|rpmnew\)/d' \
+ -e '/\(~\|\.bak\)$/d' \
+ -e '/ifcfg-[A-Za-z0-9\._-]\+$/ { s/^ifcfg-//g;s/[0-9]/ &/}' | \
+ LANG=C sort -k 1,1 -k 2n | \
+ LANG=C sed 's/ //'`
# See how we were called.
case "$1" in