From: Jo-Philipp Wich Date: Thu, 10 Feb 2011 20:05:05 +0000 (+0000) Subject: base-files: derive lease_acquired dhcp state var from /proc/uptime X-Git-Tag: reboot~17612 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4e34fc521c3711c736c16c385f232fcd28408fc3;p=oweals%2Fopenwrt.git base-files: derive lease_acquired dhcp state var from /proc/uptime SVN-Revision: 25452 --- 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"