On 3/20/06, Eric Evans <[EMAIL PROTECTED]> wrote: > On Sun, Mar 19, 2006 at 05:30:11PM +1000, Jonathan Hepburn muttered these > words: > > [ ... ] > > > Output: > > + DAEMON_NAME=ifplugd > > + DAEMON=/usr/sbin/ifplugd > > + CFG=/etc/default/ifplugd > > + '[' -x /usr/sbin/ifplugd ']' > > + HOTPLUGFUNCS=/lib/udev/hotplug.functions > > + '[' -f /lib/udev/hotplug.functions ']' > > + . /lib/udev/hotplug.functions > > ++ FIRMWARE_DIRS='/lib/firmware /usr/local/lib/firmware > > /usr/lib/hotplug/firmware' > > ++ EVENTS_DIR=/dev/.events > > ++ MODPROBE='/sbin/modprobe -s -q' > > ++ PATH=/sbin:/bin:/usr/sbin:/usr/bin > > ++ '[' -e /etc/default/hotplug ']' > > ++ '[' -x /usr/bin/logger ']' > > ++ LOGGER=/usr/bin/logger > > ++ '[' -t 1 -a -z /usr/bin/logger ']' > > ++ '[' '!' -e /dev/log ']' > > ++ '[' -t 1 ']' > > + DEBUG=yes > > + export DEBUG > > + '[' usb0 ']' > > + '[' -f /etc/default/ifplugd ']' > > + . /etc/default/ifplugd > > ++ INTERFACES= > > ++ HOTPLUG_INTERFACES=all > > ++ ARGS='-q -f -u0 -d10 -w -I' > > ++ SUSPEND_ACTION=stop > > + '[' -x /sbin/ifrename -a -r /etc/iftab ']' > > + case $ACTION in > > + for IF in '$HOTPLUG_INTERFACES' > > + '[' usb0 = all -o all = all ']' > > + debug_mesg Invoking ifplugd for usb0 > > + '[' -z yes -o yes = no ']' > > + mesg Invoking ifplugd for usb0 > > + echo Invoking ifplugd for usb0 > > Invoking ifplugd for usb0 > > + /usr/bin/logger -t 'ifplugd.hotplug[22172]' Invoking ifplugd for usb0 > > + /etc/init.d/ifplugd start usb0 > > Starting Network Interface Plugging Daemon: usb0. > > + break > > > > ifplugd will now run, and will now automatically bring up usb0. > > However, after closing the interface it will not re-start it. > > I'm not sure I understand. Are you saying that the behavior is what is > expected after manually starting it, but after removing and readding the > device it fails?
That's essentially it, yes. If I start it manually, it will sit waiting. If I add the device, usb0 pops up and is usable. If I remove the device, usb0 disappears but, upon reinsertion, the restored usb0 is missing the IP addresses. This may, I well realise, not be ifplugd's domain and therefore not ifplugd's problem. > In your configuration, the sequence of events should go roughly like the > following: > > * When the usb device is attached, udev assigns it the name usb0 and > runs /etc/hotplug.d/net/ifplugd.hotplug with ACTION=add. > * /etc/hotplug.d/net/ifplugd.hotplug runs '/etc/init.d/ifplugd start > usb0' and ifplugd is started on that interface. > * If a link beat is detected, (you can run ifplugstatus to check this > manually), "ifup usb0" is executed by ifplugd. > > When the device is detached, udev runs /etc/hotplug.d/net/ifplugd.hotplug > with ACTION=remove, which in turn runs /etc/init.d/ifplugd stop usb0, > and ifplugd is stopped for that interface. > > At this point, it appears that manual invocation of the scripts does in > fact work, so perhaps udev is not kicking things off? > > What do the logs say immediately after adding and removing the device? > You should be seeing something like .. > > Mar 12 12:37:22 aries ifplugd.hotplug[5561]: Invoking ifplugd for wlan0 > Mar 12 12:46:48 aries ifplugd.hotplug[5777]: Stopping ifplugd for wlan0 Interestingly, I only see this: Mar 25 15:35:18 ijtihad ifplugd.hotplug[31462]: Invoking ifplugd for usb0 when I start ifplugd by hand using ACTION= etc., irrespective of the device being present or not. There is, from that moment onwards, nothing from ifplugd when I add or remove the device. The kernel messages for the device read like this: Mar 25 15:39:16 ijtihad kernel: usb 3-1: new full speed USB device using ohci_hcd and address 6 Mar 25 15:39:17 ijtihad kernel: usb 3-1: Product: SL-5500 Mar 25 15:39:17 ijtihad kernel: usb 3-1: Manufacturer: Sharp Mar 25 15:39:17 ijtihad kernel: usb 3-1: SerialNumber: 400002000001 Mar 25 15:39:17 ijtihad kernel: usb0: register 'zaurus' at usb-0000:00:02.1-1, Sharp Zaurus SL-5x00, ee:23:9a:8e:15:cf For removal: Mar 25 15:46:51 ijtihad kernel: usb 3-1: USB disconnect, address 6 Mar 25 15:46:51 ijtihad kernel: usb0: unregister 'zaurus' usb-0000:00:02.1-1, Sharp Zaurus SL-5x00 And that's it. Oh, and a link beat is detected for usb0 when the device is inserted Cheers, J

