linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: zephod <zephod@chello.be>
To: linux-hotplug@vger.kernel.org
Subject: net.hotplug and ifup (Mandrake 9.0)
Date: Mon, 14 Oct 2002 11:55:39 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-103459681421316@msgid-missing> (raw)

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

             reply	other threads:[~2002-10-14 11:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-14 11:55 zephod [this message]
2002-10-14 16:06 ` net.hotplug and ifup (Mandrake 9.0) David Brownell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-hotplug-103459681421316@msgid-missing \
    --to=zephod@chello.be \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).