--- ./etc/hotplug/net.agent.orig 2004-09-20 16:02:34.000000000 -0700 +++ ./etc/hotplug/net.agent 2005-07-24 14:14:09.000000000 -0700 @@ -62,9 +62,17 @@ fi; fi + # 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 ${INTERFACE}_start + fi + # RedHat and similar - export IN_HOTPLUG=1 - if [ -x /sbin/ifup ]; then + elif [ -x /sbin/ifup ]; then + export IN_HOTPLUG=1 debug_mesg invoke ifup $INTERFACE exec /sbin/ifup $INTERFACE @@ -91,18 +99,14 @@ exit 0 ;; *) - # right now it looks like only Gentoo wants to care about - # unregistering network devices... - if [ -f /etc/gentoo-release ]; then - script=/etc/init.d/net.$INTERFACE - if [ -x "$script" ]; then - debug_mesg invoke "$script" --quiet stop - exec "$script" --quiet stop - fi - fi + # 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 ;; esac - mesg $1 $ACTION event not handled + debug_mesg $1 $ACTION event not handled ;; *)