From fdda2eaaac1de5a47d156079a93c05a879ec39eb Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 14 Jun 1999 17:36:31 +0000 Subject: fix so it does aliases in order --- sysconfig/network-scripts/ifup-aliases | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'sysconfig/network-scripts/ifup-aliases') diff --git a/sysconfig/network-scripts/ifup-aliases b/sysconfig/network-scripts/ifup-aliases index 7e06b489..7fbaf108 100755 --- a/sysconfig/network-scripts/ifup-aliases +++ b/sysconfig/network-scripts/ifup-aliases @@ -2,7 +2,8 @@ # adds aliases of device $1 -if [ "$1" = "" ]; then +device=$1 +if [ "$device" = "" ]; then echo "usage: $0 " exit 1 fi @@ -38,19 +39,12 @@ if [ -x /bin/linuxconf -a -f /usr/lib/libncurses.so.4.2 ] ; then else # we don't have linuxconf to fall back on, so presumably we do # not have to parse linuxconf ipalias ranges, either. - - # bash 2 is so much fun. - if [ "$BASH_VERSINFO" ]; then - shopt -s nullglob - else - allow_null_glob_expansion=foo - fi - for alias in /etc/sysconfig/network-scripts/ifcfg-$1:* ; do - [ -f $alias ] && /etc/sysconfig/network-scripts/ifup $alias + current=0 + while : ; do + if [ ! -f /etc/sysconfig/network-scripts/$device:$current ]; then + return + fi + /etc/sysconfig/network-scripts/ifup $device:$current + current=`expr $current + 1` done - if [ "$BASH_VERSINFO" ]; then - shopt -u nullglob - else - unset allow_null_glob_expansion - fi fi -- cgit v1.2.1