Bug 151331 - /sbin/ifup "overwrites" network configuration
/sbin/ifup "overwrites" network configuration
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-16 18:55 EST by james
Modified: 2014-03-16 22:52 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-03-16 23:36:01 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)

  None (edit)
Description james 2005-03-16 18:55:11 EST
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 
/etc/sysconfig/network-scripts/ifcfg-<blah>.

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):
initscripts-7.93.6-1

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.
  

Additional info:
Comment 1 Bill Nottingham 2005-03-16 23:36:01 EST
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 10:20:53 EST
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 14:51:54 EST
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 15:05:19 EST
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 15:08:38 EST
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 12:52:24 EST
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".

Thanks
Comment 7 Bill Nottingham 2005-03-22 23:19:25 EST
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.