summaryrefslogtreecommitdiff
path: root/package/base-files/files/usr
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/base-files/files/usr
parent00f3abb0bb13bcc4f06083a99f448c5d71e418a2 (diff)
downloadmtk-20170518-4e34fc521c3711c736c16c385f232fcd28408fc3.zip
mtk-20170518-4e34fc521c3711c736c16c385f232fcd28408fc3.tar.gz
mtk-20170518-4e34fc521c3711c736c16c385f232fcd28408fc3.tar.bz2
base-files: derive lease_acquired dhcp state var from /proc/uptime
SVN-Revision: 25452
Diffstat (limited to 'package/base-files/files/usr')
-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 b614c45..8dbff47 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"