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 of my network interfaces are
brought up by hotplug (using ifup) at boot time (bypassing the ON_BOOT
option). 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 or set the IN_HOTPLUG
variable. I suspect that it was intended by Mandrake to be used in this way.
Can anyone confirm this? I already checked out the latest version of hotplug
(without installing it though) to see if the IN_HOTPLUG variable was set
somewhere but it is not present. One of the main developpers of hotplug
pointed out that it would be a distribution's job to patch hotplug. What do
you think?
Here's another question: Will (or does(*)) drakconnect support hotplugging?
thanks,
Z
(*). I am unable to tell right now because drakconnect only allows for the
configuration of 4 interfaces (not 5, dah :( )