[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: initscripts-8.26-1 breaks old alias interface naming scheme



On Thu, 2006-02-09 at 14:15 +0100, Tomasz Kłoczko wrote:
> Today I discover new initscripts-8.26-1 breaks old network alias
> interfaces naming scheme.
> 
> In previouse version was powinble name alias interface like eth0:foobar
> 
> In current iniscritps in /etc/sysconfig/network-scripts/ifup-aliases is:
> 
> 
>        if [[ ! "$DEVNUM" =~ '^[0123456789]*$' ]]; then
>               echo $"error in $FILE: invalid alias number" >&2
>               return 1
>        fi
> 
> I think it can break many systems on upgrade to FC5.
> After commenting above old initscripts behavior is sill workig
> correctly.

Yeah, looks pretty sketchy.  I think this is more correct for the bug
it's trying to solve, but I'll let notting say for sure:

Index: ifup-aliases
===================================================================
RCS file: /usr/local/CVS/initscripts/sysconfig/network-scripts/ifup-aliases,v
retrieving revision 1.40
diff -u -p -r1.40 ifup-aliases
--- ifup-aliases	3 Feb 2006 02:01:32 -0000	1.40
+++ ifup-aliases	9 Feb 2006 18:36:43 -0000
@@ -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}:*[^~]
        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
 

-- 
  Peter


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]