aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup-aliases
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2006-02-09 18:46:10 +0000
committerPeter Jones <pjones@redhat.com>2006-02-09 18:46:10 +0000
commit24d9e8bb5fbc56104873174b5c13095954fc6eb1 (patch)
tree1c8b1ead84497c7dcfc19a0073051049c28062c3 /sysconfig/network-scripts/ifup-aliases
parent9ef884abf48c3fbd320ee3720429a6b2c8b2feda (diff)
downloadinitscripts-24d9e8bb5fbc56104873174b5c13095954fc6eb1.tar
initscripts-24d9e8bb5fbc56104873174b5c13095954fc6eb1.tar.gz
initscripts-24d9e8bb5fbc56104873174b5c13095954fc6eb1.tar.bz2
initscripts-24d9e8bb5fbc56104873174b5c13095954fc6eb1.tar.xz
initscripts-24d9e8bb5fbc56104873174b5c13095954fc6eb1.zip
- don't restrict alias names unnecessarily, but do check that the filename is
the same as any DEVICE line contained inside.
Diffstat (limited to 'sysconfig/network-scripts/ifup-aliases')
-rwxr-xr-xsysconfig/network-scripts/ifup-aliases7
1 files changed, 1 insertions, 6 deletions
diff --git a/sysconfig/network-scripts/ifup-aliases b/sysconfig/network-scripts/ifup-aliases
index 150a4a3f..d02c71c8 100755
--- a/sysconfig/network-scripts/ifup-aliases
+++ b/sysconfig/network-scripts/ifup-aliases
@@ -149,11 +149,6 @@ function new_interface ()
IPGLOP="${ipa%%.*}_${ipb%%.*}_${ipc%%.*}_${ipc#*.}";
DEVNUM=${DEVICE#*:}
- if [[ ! "$DEVNUM" =~ '^[0123456789]*$' ]]; then
- echo $"error in $FILE: invalid alias number" >&2
- return 1
- fi
-
eval "
ipseen=\$ipseen_${IPGLOP}; devseen=\$devseen_${DEVNUM};
ipseen_${IPGLOP}=$FILE; devseen_${DEVNUM}=$FILE;
@@ -302,7 +297,7 @@ for FILE in ifcfg-${parent_device}:*[^~] ; do
ini_env;
. $FILE;
[ -z "$DEVICE" ] && DEVICE=${FILE##ifcfg-}
- [ "$ONPARENT" != "no" -a "$ONPARENT" != "NO" ] && new_interface;
+ [[ ! "$ONPARENT" =~ "NO|no" ]] && [ "$DEVICE" == "${FILE##ifcfg-}" ] && new_interface;
unset DEVICE
done