Commit bb1c0bad authored by Alessandro Rubini's avatar Alessandro Rubini

userspace: fix ifplugd.action

The original ifplugd.action used "exec" improperly. Also,
we should not force "ifconfig eth0 down" when link down is detected,
or it will bever come up again.

Fix both items, even if we are not going to use ifplugd any more in
the next commit.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent d0f2a460
......@@ -24,11 +24,12 @@ if [ -z "$1" ] || [ -z "$2" ] ; then
exit 1
fi
[ "$2" = "up" ] && exec /sbin/udhcpc -n $1
[ "$2" = "up" ]; then
exec /sbin/udhcpc -n $1
fi
if [ "$2" = "down" ]; then
exec /sbin/ifconfig $1 down
killall udhcpc
exit 0
fi
exit 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment