summaryrefslogtreecommitdiff
path: root/package/base-files/files/etc/hotplug.d/iface/00-netstate
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-12-01 17:37:32 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-12-01 17:37:32 +0000
commita8c3d1ab6d33244965224b8bb7e43bdb55d28c80 (patch)
tree35f7caad9c55e8f679af27d51a2f5acdfe646608 /package/base-files/files/etc/hotplug.d/iface/00-netstate
parent30b950154b54433fb56a4a2e18ff7ea8958a948b (diff)
downloadmtk-20170518-a8c3d1ab6d33244965224b8bb7e43bdb55d28c80.zip
mtk-20170518-a8c3d1ab6d33244965224b8bb7e43bdb55d28c80.tar.gz
mtk-20170518-a8c3d1ab6d33244965224b8bb7e43bdb55d28c80.tar.bz2
base-files: save the connect time of interfaces in uci state
SVN-Revision: 24206
Diffstat (limited to 'package/base-files/files/etc/hotplug.d/iface/00-netstate')
-rw-r--r--package/base-files/files/etc/hotplug.d/iface/00-netstate1
1 files changed, 1 insertions, 0 deletions
diff --git a/package/base-files/files/etc/hotplug.d/iface/00-netstate b/package/base-files/files/etc/hotplug.d/iface/00-netstate
index 03285de..a10d871 100644
--- a/package/base-files/files/etc/hotplug.d/iface/00-netstate
+++ b/package/base-files/files/etc/hotplug.d/iface/00-netstate
@@ -1,4 +1,5 @@
[ ifup = "$ACTION" ] && {
uci_set_state network "$INTERFACE" up 1
+ uci_set_state network "$INTERFACE" connect_time $(date +%s)
[ -n "$DEVICE" ] && uci_set_state network "$INTERFACE" ifname "$DEVICE"
}