From 24d9e8bb5fbc56104873174b5c13095954fc6eb1 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 9 Feb 2006 18:46:10 +0000 Subject: - don't restrict alias names unnecessarily, but do check that the filename is the same as any DEVICE line contained inside. --- sysconfig/network-scripts/ifup-aliases | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'sysconfig') 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 -- cgit v1.2.1