summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-12-01 17:37:32 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-12-01 17:37:32 +0000
commit4956084c975b0ac051fff26e047579caad3fd05e (patch)
tree3bac66b60b2ec4e6c8c1fc91c3da5511208fcac4
parent848e1c833e606d5b978157dd6e6a401c4f97a5f1 (diff)
[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
-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 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"
}