# check for an already active dhcp server on the interface, unless 'force' is set
config_get_bool force "$cfg" force 0
[ "$force" -gt 0 ] || {
- udhcpc -n -q -R -s /bin/true -i $ifname >&- && return 0
+ udhcpc -n -q -R -s /bin/true -t 1 -i $ifname >&- && return 0
}
config_get start "$cfg" start
config_get end "$cfg" end
config_get leasetime "$cfg" leasetime
+ config_get options "$cfg" options
leasetime="${leasetime:-12h}"
start="$(dhcp_calc "${start:-100}")"
end="$((${end:-150} + 1))"
eval "$(ipcalc.sh $ipaddr $netmask $start $end)"
- append args "-F $START,$END,$NETMASK,$leasetime"
+ append args "-F $START,$END,$NETMASK,$leasetime${options:+ $options}"
}
start() {