Bug 47483

Summary: hotplug net.agent should honor ONBOOT
Product: [Retired] Red Hat Linux Reporter: Dax Kelson <dkelson>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: rvokal, teg
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-08-06 22:57:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dax Kelson 2001-07-05 18:11:02 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.3-12 i686)

Description of problem:
When you insert a network card.  It is ALWAYS brought up.  This is most
annoying on a laptop.  On a laptop with a PCCard/PCMCIA ethernet adapter,
you could be plugging into many different networks.  Because of this I have
"ONBOOT=no" in my /etc/sysconfig/network-scripts/ifcfg-eth0 file.

With Red Hat 7.1 and the default hotplug net.agent script, the ONBOOT
setting is ignored.

How reproducible:
Always

Steps to Reproduce:
1. Insert a PCMCIA/PCCard network card
2. Watch as ifup ethX is always run

	

Additional info:

Here is a patch against the net.agent in Red Hat 7.1  I noticed the rawhide
net.agent is a bit different (the rawhide net.agent still ignores ONBOOT).

--- net.agent-orig      Thu Jul  5 12:07:50 2001
+++ net.agent   Thu Jul  5 12:07:18 2001
@@ -53,7 +53,13 @@
                exit 0
                ;;
             *)
+               if LANG=C egrep -L "^ONBOOT=\"?[Nn][Oo]\"?"
/etc/sysconfig/network-scripts/ifcfg-$INTERFACE >/dev/null 2>&1 ; then
+                       exit 0
+                else
+
                exec /sbin/ifup $INTERFACE &
+
+               fi
                ;;
         esac
     fi

Comment 1 Trond Eivind Glomsrxd 2001-07-05 18:59:13 UTC
hotplug isn't used on boot... it's called by the when it get "new device"
events, like when you plug in a USB ethernet interface in a running system.
hotplug has no concept of "boot".

Comment 2 Dax Kelson 2001-07-05 19:44:09 UTC
I disagree.  Hotplug IS used at boot time with PCMCIA. 

I have a combo ethernet/modem PCMCIA card.  It always stays in the laptop.  It
is my "eth0". 

At boot up, when PCMCIA is activated, hotplug gets a "new device" event.  It
then runs "ifup eth0" regardless of what my interface configuration file says
(with ONBOOT).  This is plainly wrong.

The behavior of Red Hat 7.1 is DIFFERENT (in a worse, less flexible way) then
that of 7.0, 6.2, 6.1, 6.0, 5.2, 5.1, 5.0, etc, etc.  In all those previous
versions of Red Hat, PCMCIA ethernet devices correctly honored the value of
"ONBOOT".

Don't get hung up on what you've called the variable.  If you like, pretend it
is called "ActivateInterfaceOnDection".

Comment 3 Joshua Jensen 2001-07-06 17:36:55 UTC
I can verify that this is a problem for me as well... inserting the card ALWAYS
brings it up, regardless of what ONBOOT says.  Since there isn't a ONHOTPLUG
setting, ONBOOT should be used.  Traditionally ONBOOT has been used for device
insertion, in all other version of Red Hat Linux that I can remember.  The point
is, to change this behavior in 7.1 is bad... because we go back to not having
anything that control device insertion like ONHOTPLUG.  A resolution for this
could be creating a "ONHOTPLUG" variable, or we could simply use ONBOOT as we
have all along (except in 7.1).

Joshua Jensen
joshua

Comment 4 Trond Eivind Glomsrxd 2001-08-06 22:57:27 UTC
A partial fix is in hotplug-2001_04_24-8, initscripts needs to do the rest of
the magic.


Comment 5 Bill Nottingham 2001-08-07 05:29:13 UTC
Will be fixed in 6.12-1.