From 4956084c975b0ac051fff26e047579caad3fd05e Mon Sep 17 00:00:00 2001 From: jow Date: Wed, 1 Dec 2010 17:37:32 +0000 Subject: [PATCH] [package] base-files: save the connect time of interfaces in uci state git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24206 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/files/etc/hotplug.d/iface/00-netstate | 1 + 1 file changed, 1 insertion(+) 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 03285de18..a10d871dc 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" }