Bug 47483 - hotplug net.agent should honor ONBOOT
hotplug net.agent should honor ONBOOT
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
7.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-07-05 14:11 EDT by Dax Kelson
Modified: 2014-03-16 22:21 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-08-06 18:57:32 EDT
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 Dax Kelson 2001-07-05 14:11:02 EDT
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 14:59:13 EDT
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 15:44:09 EDT
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 13:36:55 EDT
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@redhat.com
Comment 4 Trond Eivind Glomsrxd 2001-08-06 18:57:27 EDT
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 01:29:13 EDT
Will be fixed in 6.12-1.

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