projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make ATM_DRIVERS default to n
[openwrt.git]
/
package
/
dnsmasq
/
files
/
dnsmasq.init
diff --git
a/package/dnsmasq/files/dnsmasq.init
b/package/dnsmasq/files/dnsmasq.init
index
8a5dc9a
..
cd5697c
100644
(file)
--- a/
package/dnsmasq/files/dnsmasq.init
+++ b/
package/dnsmasq/files/dnsmasq.init
@@
-2,6
+2,7
@@
# Copyright (C) 2007 OpenWrt.org
START=60
# Copyright (C) 2007 OpenWrt.org
START=60
+DNS_SERVERS=""
dhcp_calc() {
local ip="$1"
dhcp_calc() {
local ip="$1"
@@
-31,12
+32,12
@@
dnsmasq() {
append_bool "$cfg" nodaemon "-d"
append_bool "$cfg" domainneeded "-D"
append_bool "$cfg" filterwin2k "-f"
append_bool "$cfg" nodaemon "-d"
append_bool "$cfg" domainneeded "-D"
append_bool "$cfg" filterwin2k "-f"
- append_bool "$cfg" nohosts "-
I $nohosts
"
+ append_bool "$cfg" nohosts "-
h
"
append_bool "$cfg" nonegcache "-N"
append_bool "$cfg" strictorder "-o"
append_bool "$cfg" logqueries "-q"
append_bool "$cfg" nonegcache "-N"
append_bool "$cfg" strictorder "-o"
append_bool "$cfg" logqueries "-q"
- append_bool "$cfg" noresolv "-
I $noresolv
"
- append_bool "$cfg" localise_queries "-
I $localise_queries
"
+ append_bool "$cfg" noresolv "-
R
"
+ append_bool "$cfg" localise_queries "-
y
"
append_bool "$cfg" readethers "-Z"
append_bool "$cfg" dbus "-l"
append_bool "$cfg" readethers "-Z"
append_bool "$cfg" dbus "-l"
@@
-173,7
+174,12
@@
dhcp_add() {
config_get ifname "$net" ifname
[ -n "$ifname" ] || return 0
config_get ifname "$net" ifname
[ -n "$ifname" ] || return 0
- append_bool "$cfg" ingore "-I $ifname"
+ config_get dnsserver "$net" dns
+ [ -n "$dnsserver" ] && {
+ DNS_SERVERS="$DNS_SERVERS $dnsserver"
+ }
+
+ append_bool "$cfg" ignore "-I $ifname"
config_get proto "$net" proto
[ static = "$proto" ] || return 0
config_get proto "$net" proto
[ static = "$proto" ] || return 0
@@
-195,7
+201,7
@@
dhcp_add() {
leasetime="${leasetime:-12h}"
start="$(dhcp_calc "${start:-100}")"
limit="$((${limit:-150} + 1))"
leasetime="${leasetime:-12h}"
start="$(dhcp_calc "${start:-100}")"
limit="$((${limit:-150} + 1))"
- eval "$(ipcalc.sh $ipaddr $netmask $start $
end
)"
+ eval "$(ipcalc.sh $ipaddr $netmask $start $
limit
)"
append args "--dhcp-range=$name,$START,$END,$NETMASK,$leasetime${options:+ $options}"
dhcp_option_add "$cfg" "$name"
append args "--dhcp-range=$name,$START,$END,$NETMASK,$leasetime${options:+ $options}"
dhcp_option_add "$cfg" "$name"
@@
-234,10
+240,10
@@
start() {
/usr/sbin/dnsmasq $args && {
rm -f /tmp/resolv.conf
/usr/sbin/dnsmasq $args && {
rm -f /tmp/resolv.conf
- cat > /tmp/resolv.conf <<EOF
-nameserver 127.0.0.1
-search lan
-EOF
+ DNS_SERVERS="$DNS_SERVERS 127.0.0.1"
+ for DNS_SERVER in $DNS_SERVERS ; do
+ echo "nameserver $DNS_SERVER" >> /tmp/resolv.conf
+ done
}
}
}
}
This page took
0.025103 seconds
and
4
git commands to generate.