aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/network
diff options
context:
space:
mode:
authorMiloslav Trmac <mitr@volny.cz>2006-07-27 02:17:03 +0000
committerMiloslav Trmac <mitr@volny.cz>2006-07-27 02:17:03 +0000
commit3db5ad738151d27001658d570bce0c61648fc2cc (patch)
treefcb9a69ac7f3896e0636f929fd87f13828c51852 /rc.d/init.d/network
parent02315ee166c1625d9524a783a1ad49383a4623db (diff)
downloadinitscripts-3db5ad738151d27001658d570bce0c61648fc2cc.tar
initscripts-3db5ad738151d27001658d570bce0c61648fc2cc.tar.gz
initscripts-3db5ad738151d27001658d570bce0c61648fc2cc.tar.bz2
initscripts-3db5ad738151d27001658d570bce0c61648fc2cc.tar.xz
initscripts-3db5ad738151d27001658d570bce0c61648fc2cc.zip
Consistently exclude backup files when globbing
Diffstat (limited to 'rc.d/init.d/network')
-rwxr-xr-xrc.d/init.d/network9
1 files changed, 4 insertions, 5 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index a16a2692..19fa0264 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -43,13 +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 sed -e '/\(ifcfg-lo\|:\|ifcfg-.*-range\)/d' \
- -e '/\(rpmsave\|rpmorig\|rpmnew\)/d' \
- -e '/\(~\|\.bak\)$/d' \
+interfaces=$(ls ifcfg* | \
+ LANG=C sed -e "$__sed_discard_ignored_files" \
+ -e '/\(ifcfg-lo\|:\|ifcfg-.*-range\)/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/ //'`
+ LANG=C sed 's/ //')
# See how we were called.
case "$1" in