1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-24 01:01:52 +02:00

include fixes from #2429 Thanks Lubos Stanek

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9028 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
thepeople 2007-09-25 23:16:31 +00:00
parent 58e6e8c434
commit 6b945ca26e

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
@ -207,7 +206,7 @@ dhcp_add() {
dhcp_option_add "$cfg" "$name"
}
dhcp_option_add () {
dhcp_option_add() {
local cfg="$1"
local name="$2"
@ -225,6 +224,7 @@ dhcp_option_add () {
start() {
include /lib/network
scan_interfaces
config_load /var/state/network
config_load dhcp
args=""