aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
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
commitba995b32962f7b0ae110f5deceed905616d7667e (patch)
tree3bac66b60b2ec4e6c8c1fc91c3da5511208fcac4 /package/base-files
parent0ab7f53ebf8dc7628bbf23a0e6ee962ddca46ac0 (diff)
downloadmaster-187ad058-ba995b32962f7b0ae110f5deceed905616d7667e.tar.gz
master-187ad058-ba995b32962f7b0ae110f5deceed905616d7667e.tar.bz2
master-187ad058-ba995b32962f7b0ae110f5deceed905616d7667e.zip
[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
Diffstat (limited to 'package/base-files')
-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 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"
}