Red Hat Bugzilla – Bug 54953
ONBOOT=no is ignored in alias-interfaces
Last modified: 2014-03-16 22:23:56 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.78 [de] (X11; U; Linux 2.4.10 i686)
Description of problem:
alias interfaces are always activated with the parent,
any ONBOOT flag in the 'ifcfg-parent:n' is ignored
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. add an aliasinterface to eth0 e.g.: eth0:0
2. in /etc/sysconfig/network-scripts/ifcfg-eth0:0 set
3. restart the system
4. run 'ifconfig' and you will see eth0 AND eth0:0 is up
Actual Results: eth0:0 is up
Expected Results: eth0:0 should be down/not configured
Created attachment 34764 [details]
don't ignore ONBOOT in ifup-aliases
the diff file also contains a patch for static routes over alias interfaces
the original script sets all static routes over the parent interface.
if i add a static route over an alias interface i want it over this alias
This bug is still present in 7.2's initscripts-6.43-1. Is there some way to
update this ticket to include 7.2 and not only 7.1 as it does now?
I am personally somewhat surprised that this isn't receiving more attention.
I was about to submit a similar bug: If you configure a network interface not to
be activated at boot time, it is still activated. The problem is that
redhat-config-network writes the 'no' between single quotes in ifcfg-* :
while the network init script /etc/rc.d/init.d/network looks for "no" or no.
A quick fix, that works for me is to change the above script to recognize 'no'
too. For that, just change all occurences of
egrep -L "^ONBOOT=[\"]?[Nn][Oo][\"]?" ifcfg-$i
egrep -L "^ONBOOT=[\"']?[Nn][Oo][\"']?" ifcfg-$i
in /etc/rc.d/init.d/network (there should be 2 places where the test is done).
This works for me, hope it does for you too.
I was just about to report this in RH 7.3.
It seems ALL my pppx interfaces have this bug. NONE of them are supposed to
come up at boot yet it reports that all of them do and it reports an okay, but
ifconfig shows none of them up. This is a little misinforming as they all cound
not possible come up at the same time as they all use the same modem (modem0)
and same ttySx.
in RH 7.3 it was changed to
if LANG=C egrep -L "^ONBOOT=\"?[Nn][Oo]\"?" ifcfg-$i > /dev/null
which still does not work. I guess I wonder why RH cant fix something so simple?
Oh and the part where it looks at VPN interfaces has the same issue.
Probably should be:
LANG=C egrep -L "^ONBOOT="'?[Nn][Oo]'?" ifcfg-*
LANG=C egrep -L "^ONBOOT="[\"']?[Nn][Oo][\"']?" ifcfg-*
This works in 7.3
The problem is still present in RedHat 8.0. /etc/init.d/network uses "boot" as
a second argument to /sbin/ifup, which tells ifup to check the value of ONBOOT.
However, /sbin/ifup in turn calls ifup-post (without the "boot" argument), which
in turn calls ifup-aliases (without the "boot" argument), which brings up the
interfaces in the new_interfaces function.
Appropriate solution: /sbin/ifup should export an environmental variable $BOOT
if it receives "boot" as its second argument. The new_interfaces function in
ifup-aliases should check before bringing up each interface, to see whether
$BOOT=yes and $ONBOOT=no.
The current Phoebe initscripts have a special 'ONPARENT' flag for alias
interfaces; this determines whether they're brought up with the parent,
regardless of boot/nonboot state.
Using this should solve your issue, yes?