linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* net.hotplug and ifup (Mandrake 9.0)
@ 2002-10-14 11:55 zephod
  2002-10-14 16:06 ` David Brownell
  0 siblings, 1 reply; 2+ messages in thread
From: zephod @ 2002-10-14 11:55 UTC (permalink / raw)
  To: linux-hotplug

Dear all,

I have a setup with 5 network cards and I only start 2 of them at boot time 
(ON_BOOT=yes/no in the corresponding 
/etc/sysconfig/network-scripts/ifcfg-eth?). When I upgraded form Mandrake 8.2 
to 9.0 the version of hotplug changed from 2002_01_14 to 2002_04_01. One of 
the differences is the following lines in net.agent (line 30):

    # Don't do anything if the network is stopped
    if [ ! -f /var/lock/subsys/network ]; then
        exit 0
    fi

With the removal of this piece of code all network interfaces are brought up 
by hotplug (using ifup) at boot time. Although I was tempted to reinsert 
these lines as a quick hack, I dove into the .etc directory to find some 
answers. After some digging I encountered some lines (47 in /sbin/ifup):

if [ -n "$IN_HOTPLUG" -a "${HOTPLUG}" = "no" -o "${HOTPLUG}" = "NO" ]
then
    exit 0
fi

So I tried to set a "HOTPLUG=NO" in the interfaces I don't need at boot time. 
Offcourse now these interfaces are impossible to setup with e.g. ifup eth1. 
This was not the desired effect. The solution was to add "HOTPLUG=no" (notice 
the difference) to the corresponding 
/etc/sysconfig/network-scripts/ifcfg-eth? and add a line to 
/etc/hotplug/hotplpug.functions (line 21):

export IN_HOTPLUG=yes

which produces the result I need.

I would like to see some comments about this. As far as I can see there are no 
other scripts (installed on my system) which use the IN_HOTPLUG variable. I 
suspect that it was intended to be used in this way. Can anyone confirm this? 
I checked out the latest version of hotplug (without installing it though) to 
see if the IN_HOTPLUG variable was set somewhere but couldn't find it.


thanks,

Z




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: net.hotplug and ifup (Mandrake 9.0)
  2002-10-14 11:55 net.hotplug and ifup (Mandrake 9.0) zephod
@ 2002-10-14 16:06 ` David Brownell
  0 siblings, 0 replies; 2+ messages in thread
From: David Brownell @ 2002-10-14 16:06 UTC (permalink / raw)
  To: linux-hotplug

I'm not quite clear on the problem Mandrake's scripts are expecting to
solve here.  But it's long seemed to me that the network admin scripts
should get better support for dynamically adding/removing interfaces,
and this ONBOOT problem is cut from the same fabric.


> I checked out the latest version of hotplug (without installing it though) to 
> see if the IN_HOTPLUG variable was set somewhere but couldn't find it.

It'd be easy to add this to /sbin/hotplug, to support "if (coming from...)"
style spaghetti coding in admin scripts.  But I'd rather leave such stuff
to distro vendors.

- Dave





-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-14 16:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-14 11:55 net.hotplug and ifup (Mandrake 9.0) zephod
2002-10-14 16:06 ` David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).