diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-12-01 17:37:32 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-12-01 17:37:32 +0000 |
commit | a8c3d1ab6d33244965224b8bb7e43bdb55d28c80 (patch) | |
tree | 35f7caad9c55e8f679af27d51a2f5acdfe646608 /package/base-files/files | |
parent | 30b950154b54433fb56a4a2e18ff7ea8958a948b (diff) | |
download | mtk-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')
-rw-r--r-- | package/base-files/files/etc/hotplug.d/iface/00-netstate | 1 |
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" } |