aboutsummaryrefslogtreecommitdiffstats
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
commit2d13d431dcaba9b7eee7b09a128f98e0c7adc3a4 (patch)
tree9abcf6afba447f394ab00991bf78aa0c3985be88
parent62019069c77114dd3dd1d46c56ed2f6f4b0644e8 (diff)
downloadupstream-2d13d431dcaba9b7eee7b09a128f98e0c7adc3a4.tar.gz
upstream-2d13d431dcaba9b7eee7b09a128f98e0c7adc3a4.tar.bz2
upstream-2d13d431dcaba9b7eee7b09a128f98e0c7adc3a4.zip
[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
-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"