--- ./etc/hotplug/net.agent.orig 2001-09-19 17:14:00.000000000 -0700 +++ ./etc/hotplug/net.agent 2003-05-18 17:59:02.000000000 -0700 @@ -40,10 +40,17 @@ # we can't do much here without distro-specific knowledge # such as whether/how to invoke DHCP, set up bridging, etc. + # Slackware Linux: + if [ -x /etc/rc.d/rc.inet1 ]; then + # Interface already up? If so, skip. + if ! /sbin/ifconfig | grep "^${INTERFACE} " 1> /dev/null ; then + debug_mesg run rc.inet1 + exec /etc/rc.d/rc.inet1 + fi # RedHat and similar - if [ -x /sbin/ifup ]; then - debug_mesg invoke ifup $INTERFACE - exec /sbin/ifup $INTERFACE + elif [ -x /sbin/ifup ]; then + debug_mesg invoke ifup $INTERFACE + exec /sbin/ifup $INTERFACE else mesg "how do I bring interfaces up on this distro?" fi @@ -52,6 +59,14 @@ mesg $1 $ACTION event not handled ;; +unregister) + # Does the interface use dhcpcd? If it does, we must kill the daemon. + if [ -r /etc/dhcpc/dhcpcd-$INTERFACE.pid ]; then + debug_mesg killing /etc/dhcpc/dhcpcd-$INTERFACE.pid + kill -15 `cat /etc/dhcpc/dhcpcd-$INTERFACE.pid` + fi + ;; + *) debug_mesg NET $ACTION event not supported exit 1 ;;