aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/config
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-01-23 22:19:29 +0000
committerJo-Philipp Wich <jow@openwrt.org>2015-01-23 22:19:29 +0000
commit1f6411e4365d8b4294027b785b2b66ddcfe3f105 (patch)
treedde3ae88f726049d2858d7b593dc80e80e55a14e /package/network/config
parent4ec8d515b21ece4d56186a2e99d9932fe2971142 (diff)
downloadupstream-1f6411e4365d8b4294027b785b2b66ddcfe3f105.tar.gz
upstream-1f6411e4365d8b4294027b785b2b66ddcfe3f105.tar.bz2
upstream-1f6411e4365d8b4294027b785b2b66ddcfe3f105.zip
netifd: store additional DHCP lease information
Extend the DHCPv4 handler script to store additional information from the DHCP lease in the per-interface data object. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 44092
Diffstat (limited to 'package/network/config')
-rwxr-xr-xpackage/network/config/netifd/files/lib/netifd/dhcp.script14
1 files changed, 7 insertions, 7 deletions
diff --git a/package/network/config/netifd/files/lib/netifd/dhcp.script b/package/network/config/netifd/files/lib/netifd/dhcp.script
index 54d3aa1072..288ab18d00 100755
--- a/package/network/config/netifd/files/lib/netifd/dhcp.script
+++ b/package/network/config/netifd/files/lib/netifd/dhcp.script
@@ -34,7 +34,13 @@ setup_interface () {
done
proto_add_data
- [ -n "$ZONE" ] && json_add_string zone "$ZONE"
+ [ -n "$ZONE" ] && json_add_string zone "$ZONE"
+ [ -n "$ntpsrv" ] && json_add_string ntpserver "$ntpsrv"
+ [ -n "$timesvr" ] && json_add_string timeserver "$timesvr"
+ [ -n "$hostname" ] && json_add_string hostname "$hostname"
+ [ -n "$message" ] && json_add_string message "$message"
+ [ -n "$timezone" ] && json_add_int timezone "$timezone"
+ [ -n "$lease" ] && json_add_int leasetime "$lease"
proto_close_data
proto_send_update "$INTERFACE"
@@ -69,12 +75,6 @@ setup_interface () {
ubus call network add_dynamic "$(json_dump)"
fi
-
- # TODO
- # [ -n "$ntpsrv" ] && change_state network "$ifc" lease_ntpsrv "$ntpsrv"
- # [ -n "$timesvr" ] && change_state network "$ifc" lease_timesrv "$timesvr"
- # [ -n "$hostname" ] && change_state network "$ifc" lease_hostname "$hostname"
- # [ -n "$timezone" ] && change_state network "$ifc" lease_timezone "$timezone"
}
deconfig_interface() {