diff options
Diffstat (limited to 'debian/ifplugd.udev.agent')
-rw-r--r-- | debian/ifplugd.udev.agent | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/debian/ifplugd.udev.agent b/debian/ifplugd.udev.agent index fe02b51..60a232c 100644 --- a/debian/ifplugd.udev.agent +++ b/debian/ifplugd.udev.agent @@ -32,6 +32,9 @@ search_interfaces () { return 1 } +IFPLUGD=/usr/sbin/ifplugd +test -x $IFPLUGD || exit 0 + search_interfaces "$INTERFACE" "$INTERFACES" if [ $? -gt 0 ] ; then # Interface isn't statically managed by ifplugd @@ -41,11 +44,14 @@ if [ $? -gt 0 ] ; then case $ACTION in add|register) debug_mesg Invoking $DAEMON_NAME for $INTERFACE - exec /etc/init.d/$DAEMON_NAME start $INTERFACE& + IF1=$(echo $INTERFACE | sed "s/-/_/") + A=$(eval echo \$\{ARGS_${IF1}\}) + [ -z "$A" ] && A="$ARGS" + exec $IFPLUGD -i $INTERFACE $A & ;; remove|unregister) debug_mesg Stopping $DAEMON_NAME for $INTERFACE - exec /etc/init.d/$DAEMON_NAME stop $INTERFACE& + exec $IFPLUGD -k --wait-on-kill -i $INTERFACE & ;; esac break |