aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-02-10 20:05:05 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-02-10 20:05:05 +0000
commit4e34fc521c3711c736c16c385f232fcd28408fc3 (patch)
tree714bbce15f1c08ad8e1d5d97fa094f92c0a7c197 /package
parent00f3abb0bb13bcc4f06083a99f448c5d71e418a2 (diff)
downloadupstream-4e34fc521c3711c736c16c385f232fcd28408fc3.tar.gz
upstream-4e34fc521c3711c736c16c385f232fcd28408fc3.tar.bz2
upstream-4e34fc521c3711c736c16c385f232fcd28408fc3.zip
base-files: derive lease_acquired dhcp state var from /proc/uptime
SVN-Revision: 25452
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 b614c45865..8dbff47475 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"