[OpenWrt-Devel] [PATCH] add UCI option for leasetime per static host
ufomanfred at freaktose.net
ufomanfred at freaktose.net
Wed Dec 30 00:28:14 EST 2015
Hi guys,
I wanted to use this feature and decided to figure out how to commit to the
awesome OpenWrt project.
I am completely new to development so please be kind when reviewing. I
appreciate any (constructive) feedback!
Cheers, ufomanfred
Edit: screw you HTML webmail client..
---
package/network/services/dnsmasq/files/dnsmasq.init | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init
b/package/network/services/dnsmasq/files/dnsmasq.init
index 3ef2b3d..f89bd8c 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -334,7 +334,9 @@ dhcp_host_add() {
config_get_bool broadcast "$cfg" broadcast 0
[ "$broadcast" = "0" ] && broadcast=
- xappend
"--dhcp-host=$macs${networkid:+,net:$networkid}${broadcast:+,set:needs-broadcast}${tag:+,set:$tag}${ip:+,$ip}${name:+,$name}"
+ config_get leasetime "$cfg" leasetime
+
+ xappend
"--dhcp-host=$macs${networkid:+,net:$networkid}${broadcast:+,set:needs-broadcast}${tag:+,set:$tag}${ip:+,$ip}${name:+,$name}${leasetime:+,$leasetime}"
}
dhcp_tag_add() {
--
2.1.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list