diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-10-20 15:01:06 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-10-20 15:01:06 +0000 |
commit | 7b8a53966aaa3fd75af370c9bd8d4c4009a5c6e3 (patch) | |
tree | dec1ecff302a74f447bcca46f0d0dcfbebbb4a20 /package/base-files-network/files/etc/hotplug.d/iface/00-netstate | |
parent | c0b0967f03e9e20831a49e2bd6563f443ba0bbd1 (diff) | |
download | upstream-7b8a53966aaa3fd75af370c9bd8d4c4009a5c6e3.tar.gz upstream-7b8a53966aaa3fd75af370c9bd8d4c4009a5c6e3.tar.bz2 upstream-7b8a53966aaa3fd75af370c9bd8d4c4009a5c6e3.zip |
base-files: move network related scripts to a separate package to make the transition to netifd easier
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28495 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files-network/files/etc/hotplug.d/iface/00-netstate')
-rw-r--r-- | package/base-files-network/files/etc/hotplug.d/iface/00-netstate | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/package/base-files-network/files/etc/hotplug.d/iface/00-netstate b/package/base-files-network/files/etc/hotplug.d/iface/00-netstate new file mode 100644 index 0000000000..37b1e934eb --- /dev/null +++ b/package/base-files-network/files/etc/hotplug.d/iface/00-netstate @@ -0,0 +1,5 @@ +[ ifup = "$ACTION" ] && { + uci_toggle_state network "$INTERFACE" up 1 + uci_toggle_state network "$INTERFACE" connect_time $(sed -ne 's![^0-9].*$!!p' /proc/uptime) + [ -n "$DEVICE" ] && uci_toggle_state network "$INTERFACE" ifname "$DEVICE" +} |