Package: ifplugd
Version: 0.28-2.1
Severity: normal

Init script /etc/init.d/ifplugd starts daemons for non-existing static
interfaces, if they have been defined in /etc/default/ifplugd or given
as command line arguments for /etc/init.d/ifplugd. I suggest applying
the attached patch.

It may usually be user's fault, if he/she defines non-existing interface
names, but there is another point of view. In my laptop I need to start
the ifplugd for my hotpluggable PCMCIA ethernet interface (eth0) during
a boot. By defining eth0 only as HOTPLUG_INTERFACE does not bring it up
in boot; only until I remove the PCMCIA card and plug it in again the
interface eth0 is brought up. Hence I want to define eth0 both as static
and hotplugged interface (with ifplugd's debconf) so that ifplugd is
running right after a boot. This works, but if PCMCIA card is not
plugged in during a boot (eth0 does not exist), the ifplugd daemon
is started anyway, which I think is wrong. The attached patch solves
this problem.

Or maybe ifplugd should check during a boot if hotpluggable interfaces
exist and start daemon for those automatically.


-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.18-3-686
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8)

Versions of packages ifplugd depends on:
ii  debconf [debconf-2.0]        1.5.11      Debian configuration management sy
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries
ii  libdaemon0                   0.10-1      lightweight C library for daemons

Versions of packages ifplugd recommends:
ii  ifupdown                      0.6.8      high level tools to configure netw

-- debconf information:
* ifplugd/interfaces:
* ifplugd/hotplug_interfaces: eth0
* ifplugd/args: -q -f -u0 -d10 -w -I -b
* ifplugd/suspend_action: stop
--- /etc/init.d/ifplugd 2006-12-09 15:20:34.000000000 +0200
+++ /etc/init.d/ifplugd-new     2006-12-29 17:14:30.000000000 +0200
@@ -66,6 +66,7 @@
     start)
         echo -n "Starting Network Interface Plugging Daemon:"
         for IF in $INTERFACES ; do
+            grep --quiet $IF /proc/net/dev || continue
             IF1=$(echo $IF | sed "s/-/_/")
             A=$(eval echo \$\{ARGS_${IF1}\})
             [ -z "$A" ] && A="$ARGS"

Reply via email to