Bug#95354: net.agent and ifdown
Hi,
I'm maintainer of hotplug deb package, and got the bug report
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug•354&repeatmerged=yes
I'm not sure, but would this patch solve this problem?
etc/hotplug/net.agent +10 -0
@@ -52,6 +52,16 @@ mesg $1 $ACTION event not handled ;; +unregister) + if [ -x /sbin/ifdown ]; then + if [ "$DEBUG" != "" ]; then + mesg invoke ifdown $INTERFACE + fi + exec /sbin/ifdown $INTERFACE + fi + mesg $1 $ACTION event not handled + ;; + *) if [ "$DEBUG" != "" ]; then mesg NET $ACTION event not supported
Regards,
Fumitoshi UKAI
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Hmm, interesting ... Debian "ifup" maintains non-kernel state, trying to track (augment?) kernel state. I'd suspect that's likely to be a bit fragile (as in this bug).
Quoted 1 line
I'm not sure, but would this patch solve this problem?
The interface is not listed in the kernel state any more, so "ifdown $INTERFACE" will fail at least on RH7 (which I just checked). Not that the network hotplug code cares about agent failure status code now, but I'd not return with that "ifdown" failure status. Other than that, it looks like it's worth trying.
The "hot unplug" paths deserve more attention than they've gotten so far. That's not just in relation to the module unloading problem that's gotten discussed a bit.
- Dave
Quoted 10 lines
etc/hotplug/net.agent +3
-0@@ -52,6 +52,16 @@ mesg $1 $ACTION event not handled ;; +unregister) + if [ -x /sbin/ifdown ]; then + if [ "$DEBUG" != "" ]; then
etc/hotplug/net.agent line 67
Quoted 10 lines
etc/hotplug/net.agent +7
-0+ mesg invoke ifdown $INTERFACE + fi + exec /sbin/ifdown $INTERFACE + fi + mesg $1 $ACTION event not handled + ;; + *) if [ "$DEBUG" != "" ]; then mesg NET $ACTION event not supported
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel