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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44092 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
04ef21d09b
commit
a5cf2022ff
1 changed files with 7 additions and 7 deletions
|
@ -34,7 +34,13 @@ setup_interface () {
|
||||||
done
|
done
|
||||||
|
|
||||||
proto_add_data
|
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_close_data
|
||||||
|
|
||||||
proto_send_update "$INTERFACE"
|
proto_send_update "$INTERFACE"
|
||||||
|
@ -69,12 +75,6 @@ setup_interface () {
|
||||||
|
|
||||||
ubus call network add_dynamic "$(json_dump)"
|
ubus call network add_dynamic "$(json_dump)"
|
||||||
fi
|
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() {
|
deconfig_interface() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue