Bug 54953 - ONBOOT=no is ignored in alias-interfaces
ONBOOT=no is ignored in alias-interfaces
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
7.3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-10-23 13:33 EDT by Leonhard Zachl
Modified: 2014-03-16 22:23 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-02-05 12:48:21 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
don't ignore ONBOOT in ifup-aliases (1.42 KB, patch)
2001-10-23 13:44 EDT, Leonhard Zachl
no flags Details | Diff

  None (edit)
Description Leonhard Zachl 2001-10-23 13:33:09 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):


How reproducible:
Always

Steps to Reproduce:
1. add an aliasinterface to eth0 e.g.: eth0:0
2. in /etc/sysconfig/network-scripts/ifcfg-eth0:0 set
   ONBOOT=no
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

Additional info:
Comment 1 Leonhard Zachl 2001-10-23 13:44:35 EDT
Created attachment 34764 [details]
don't ignore ONBOOT in ifup-aliases
Comment 2 Leonhard Zachl 2001-10-23 13:54:44 EDT
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
interface!
Comment 3 Louis Mandelstam 2002-02-19 17:33:10 EST
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.
Comment 4 Radu Cornea 2002-05-16 02:46:51 EDT
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-* :

ONBOOT='no'

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

to

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.
Comment 5 Joe Acosta 2002-05-25 14:30:02 EDT
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-*

or 

LANG=C  egrep -L  "^ONBOOT="[\"']?[Nn][Oo][\"']?" ifcfg-*

also works.

This works in 7.3
Comment 6 Brock Sides 2003-02-05 12:26:12 EST
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.
Comment 7 Bill Nottingham 2003-02-05 12:48:21 EST
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?

Note You need to log in before you can comment on or make changes to this bug.