--- ifplugd.action.orig 2003-11-27 01:27:14.000000000 +0100 +++ ifplugd.action 2003-11-27 02:56:21.000000000 +0100 @@ -9,20 +9,26 @@ # up or down. # -case "$2" in - up) - state=start - ;; - down) - state=stop - ;; - *) - echo "$0: wrong arguments" - echo "Call with " - exit 1 - ;; -esac +rc_script=/etc/init.d/net.$1 -[ -x /etc/init.d/net.$1 ] && /etc/init.d/net.$1 --quiet $state +if [ -x ${rc_script} ]; then + case "$2" in + up) + /sbin/ifconfig $1 down &> /dev/null + $rc_script --quiet start || exit $? + ;; + down) + $rc_script --quiet stop || exit $? + ;; + *) + echo "$0: wrong arguments" + echo "Call with " + exit 1 + ;; + esac +else + echo "$0: init script ${rc_script} not found" + exit 2 +fi exit 0