summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-02-10 20:05:05 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-02-10 20:05:05 +0000
commitf79493eb953d33df8bedf1535bb25d8e043def60 (patch)
tree9abcf6afba447f394ab00991bf78aa0c3985be88 /package
parent4a77b46a0e89f5b252906346256d7ee185284887 (diff)
[package] base-files: derive lease_acquired dhcp state var from /proc/uptime
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25452 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rwxr-xr-xpackage/base-files/files/usr/share/udhcpc/default.script2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/base-files/files/usr/share/udhcpc/default.script b/package/base-files/files/usr/share/udhcpc/default.script
index b614c4586..8dbff4747 100755
--- a/package/base-files/files/usr/share/udhcpc/default.script
+++ b/package/base-files/files/usr/share/udhcpc/default.script
@@ -103,7 +103,7 @@ setup_interface () {
# UCI State
change_state network "$ifc" lease_server "$serverid"
- change_state network "$ifc" lease_acquired "$(date '+%s')"
+ change_state network "$ifc" lease_acquired "$(sed -ne 's![^0-9].*$!!p' /proc/uptime)"
change_state network "$ifc" lease_lifetime "$lease"
[ -n "$ntpsrv" ] && change_state network "$ifc" lease_ntpsrv "$ntpsrv"
[ -n "$timesvr" ] && change_state network "$ifc" lease_timesrv "$timesvr"