diff options
Diffstat (limited to 'rootfs/etc/ifplugd/ifplugd.action')
-rwxr-xr-x | rootfs/etc/ifplugd/ifplugd.action | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rootfs/etc/ifplugd/ifplugd.action b/rootfs/etc/ifplugd/ifplugd.action new file mode 100755 index 0000000..05db65d --- /dev/null +++ b/rootfs/etc/ifplugd/ifplugd.action @@ -0,0 +1,9 @@ +#!/bin/sh -e +INTERFACE="$1" +NEW_STATE="$2" + +test -n "$INTERFACE" +test -n "$NEW_STATE" + +[ "$NEW_STATE" = "up" ] && exec ifup "$INTERFACE" +[ "$NEW_STATE" = "down" ] && exec ifdown "$INTERFACE" |