include fixes from #2429 Thanks Lubos Stanek

SVN-Revision: 9028
This commit is contained in:
Travis Kemen 2007-09-25 23:16:31 +00:00
parent 000b777b73
commit 112c359dad

View File

@ -21,9 +21,19 @@ append_bool() {
local section="$1"
local option="$2"
local value="$3"
local _tmp
config_get_bool _tmp "$section" "$option"
[ "$_tmp" -gt 0 ] && append args "$3"
local _loctmp
config_get_bool _loctmp "$section" "$option"
[ "$_loctmp" -gt 0 ] && append args "$3"
}
append_parm() {
local section="$1"
local option="$2"
local switch="$3"
local _loctmp
config_get _loctmp "$section" "$option"
[ -z "$_loctmp" ] && return 0
append args "$switch $_loctmp"
}
dnsmasq() {
@ -41,21 +51,10 @@ dnsmasq() {
append_bool "$cfg" readethers "-Z"
append_bool "$cfg" dbus "-l"
config_get dnsforwardmax "$cfg" dnsforwardmax
dnsforwardmax="${dnsforwardmax:-150}"
append args "-0 $dnsforwardmax"
config_get port "$cfg" port
port="${port:-53}"
append args "-p $port"
config_get ednspacket_max "$cfg" ednspacket_max
ednspacket_max="${ednspacket_max:-1280}"
append args "-P $ednspacket_max"
config_get dhcpleasemax "$cfg" dhcpleasemax
dhcpleasemax="${dhcpleasemax:-150}"
append args "-X $dhcpleasemax"
append_parm "$cfg" dnsforwardmax "-0"
append_parm "$cfg" port "-p"
append_parm "$cfg" ednspacket_max "-P"
append_parm "$cfg" dhcpleasemax "-X"
config_get addnhosts "$cfg" addnhosts
config_get interface "$cfg" interface
@ -225,6 +224,7 @@ dhcp_option_add () {
start() {
include /lib/network
scan_interfaces
config_load /var/state/network
config_load dhcp
args=""