Add support for default lease time in nvram
authorFlorian Fainelli <florian@openwrt.org>
Thu, 30 Mar 2006 10:14:26 +0000 (10:14 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Thu, 30 Mar 2006 10:14:26 +0000 (10:14 +0000)
SVN-Revision: 3555

openwrt/package/dnsmasq/files/S50dnsmasq

index 7af2a907f8d69d0d35d4dd0bfc182ff3d27f1d3d..1c47011d05e0d3939b3f924870172d7c39ee8aee 100755 (executable)
@@ -19,10 +19,11 @@ udhcpc -n -q -R -s /bin/true -i $ifname >&- || {
       num=$(nvram get dhcp_num)
 
   eval $(ipcalc $ipaddr $netmask ${start:-100} ${num:-150})
+  lease=$(nvram get dhcp_lease)
   
   # and pass the args via the commandline
   # (because trying to edit the config from here is crazy)
-  args="-K -F $START,$END,$NETMASK,12h"
+  args="-K -F $START,$END,$NETMASK,${lease:-12h}"
 }
 
 # ignore requests from wan interface