diff options
author | Bill Nottingham <notting@redhat.com> | 1999-06-14 17:36:31 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 1999-06-14 17:36:31 +0000 |
commit | fdda2eaaac1de5a47d156079a93c05a879ec39eb (patch) | |
tree | d158557ca7ead33b3f8cdb43767426649bf1cc82 /sysconfig | |
parent | a757ce6ebbcfc3e7e1306edd8765d8e02d15ddef (diff) | |
download | initscripts-fdda2eaaac1de5a47d156079a93c05a879ec39eb.tar initscripts-fdda2eaaac1de5a47d156079a93c05a879ec39eb.tar.gz initscripts-fdda2eaaac1de5a47d156079a93c05a879ec39eb.tar.bz2 initscripts-fdda2eaaac1de5a47d156079a93c05a879ec39eb.tar.xz initscripts-fdda2eaaac1de5a47d156079a93c05a879ec39eb.zip |
fix so it does aliases in order
Diffstat (limited to 'sysconfig')
-rwxr-xr-x | sysconfig/network-scripts/ifup-aliases | 24 |
1 files changed, 9 insertions, 15 deletions
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 <net-device>" 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 |