From: Jo-Philipp Wich Date: Wed, 1 Dec 2010 17:37:32 +0000 (+0000) Subject: [package] base-files: save the connect time of interfaces in uci state X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=c06377ce542d2c34d4678f18163df637afadf681 [package] base-files: save the connect time of interfaces in uci state SVN-Revision: 24206 --- 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 03285de18f..a10d871dc4 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" }