Bug 151331 - /sbin/ifup "overwrites" network configuration
Summary: /sbin/ifup "overwrites" network configuration
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
(Show other bugs)
Version: 3
Hardware: All Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2005-03-16 23:55 UTC by james
Modified: 2014-03-17 02:52 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-03-17 04:36:01 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description james 2005-03-16 23:55:11 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686) Opera 7.54  [en]

Description of problem:
/sbin/ifup in initscripts-7.93.6-1 refuses to play nicely with others.  There seems 
to be no configuration option for "LEAVE MY NETWORK CONFIGURATION ALONE!"

This behavior has changed from initscripts-7.93.5-1, where 5-1 had
 if [ "foo$2" = "fooboot" -a "${ONBOOT}" = "no" -o "${ONBOOT}" = "NO" ]
where at least you could put ONBOOT=NO, in capitals, in /etc/sysconfig/network-
scripts/ifcfg-eth0 and /sbin/ifup would leave the interface alone.

Maybe this was accidental?  Now, in version 6-1, /sbin/ifup makes a mess of any pre-
existing network configuration where there is
 if [ "foo$2" = "fooboot" ] && [ "${ONBOOT}" = "no" -o "${ONBOOT}" = "NO" ]

Ok, fine, but THERE SHOULD BE SOME WAY TO BLOCK /sbin/ifup.

So, for instance, there should be a "leave my interface alone!" option in "system-
config-network", and there should be some kind of option available in 

How about simply this: add, in /sbin/ifup, 

if [ "foo$2" = "fooboot" ] && [ "${ONBOOT}" = "no" -o "${ONBOOT}" = "NO" ] || [ 
"${ONBOOT}" = "NEVER" ]

so that ifcfg-<blah> can simply have ONBOOT=NEVER.  Someone can modify "system-
config-network" later.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

Additional info:

Comment 1 Bill Nottingham 2005-03-17 04:36:01 UTC
See bug 136531; the previous behavior is an out-and-out bug.

Inactive configurations can be saved in /etc/sysconfig/networking, for example.

Comment 2 james 2005-03-17 15:20:53 UTC
It seems that setting "HOTPLUG=NO", in addition to "ONBOOT=NO", 
in /etc/sysconfig/network-scripts/ifcfg-eth0 "works" in my case, to disable
/sbin/ifup when my system boots.

An "Inactive configuration" is not the idea here, though.  I don't want to
completely disable auto-configuration, just disable auto-configuration on boot.
 On my laptop, which often, but not always, has an ethernet pcCard plugged in
when the system boots, I just want something different to happen, interface
configuration-wise, when I plug in the ethernet card _after_ the system boots,
where I might have also plugged in the wireless card, and now I want the
ethernet card to present a different subnet, say.

So, two things:  Why is my desktop machine seeing a "hotplug" event on system
boot, such that using "HOTPLUG=NO" changes the boot configuration behavior?  and
 shouldn't system-config-network have some way of differentiating "start at
boot" and "start on hotplug", where system-config-network only seems to have
"Activate device when the computer starts"?

Comment 3 Bill Nottingham 2005-03-17 19:51:54 UTC
PCcard/cardbus network interfaces are brought up via hotplug. It's certainly
conceivable that s-c-network could extend the 'boot' to also set hotplug=no.

Comment 4 james 2005-03-17 20:05:19 UTC
Yes, but the question is, why is my desktop pci-bus - no PCcard/cardbus -
onboard VIA ethernet controller being "brought up" at boot via hotplug?  Is the
kernel actually generating a "hotplug" event at boot?  Or is the /sbin/ifup
script running at an inappropriate time?  Or?

Comment 5 Bill Nottingham 2005-03-17 20:08:38 UTC
Shouldn't be being brought up via hotplug. Do you have a log of when
specifically it's being brought up in the boot cycle?

Comment 6 james 2005-03-19 17:52:24 UTC
Ok, after some more poking around...

I load the ipv6 kernel module, which does generate an "/sbin/hotplug net" event.
 I had then, after loading the ipv6 module, configured my ethernet interfaces. 
Soon after that, the /sbin/ifup script would finally run it's course and
reconfigure my interfaces.  That's why using "HOTPLUG=NO" makes things work here.

On my laptop, I like to have the autoconfig scripts work.  On my desktop
machine, I like to turn off the autoconfiguration.

Probably the only interesting thing to do would be to have s-c-network provide
some kind of "Activate device on hotplug event"/"Disable hotplug" option in the GUI.

Also, a note about "HOTPLUG=..." in /usr/share/doc/initscripts-7.93.6/sysconfig.txt
would be nice.  Currently there is no mention whatsoever about "HOTPLUG".


Comment 7 Bill Nottingham 2005-03-23 04:19:25 UTC
Added a quick note on ONHOTPLUG to the docs.

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