summaryrefslogtreecommitdiff
path: root/package/dnsmasq/files/dnsmasq.init
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-09-16 18:15:31 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-09-16 18:15:31 +0000
commit5949fd8b7c850cc7267e27ffa650218ec5e0bd02 (patch)
tree17d213573bfb4f9a43c481826e4223f731b90fc7 /package/dnsmasq/files/dnsmasq.init
parent220c2d388ddd96bf1c1e4610e6b0c01ca63635ca (diff)
dnsmasq startup script update: add notinterface parameter
This tiny patch makes the dnsmasq init.d script listen to a parameter called "notinterface", which tells dnsmasq to not listen on a defined set of interfaces. By default dnsmasq *always* listens on the loopback interface, even if you tell it to specifically listen on a certain other interface. Sometimes this is not desirable behaviour, so you might want to turn it off. This is useful when, for example, you want to have your own DNS server listening on the loopback interface. Signed-off-by: Johnny Halfmoon <jhalfmoon at milksnot.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17599 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/dnsmasq/files/dnsmasq.init')
-rw-r--r--package/dnsmasq/files/dnsmasq.init5
1 files changed, 5 insertions, 0 deletions
diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init
index b5ecf1de27..1aeeb94b26 100644
--- a/package/dnsmasq/files/dnsmasq.init
+++ b/package/dnsmasq/files/dnsmasq.init
@@ -44,6 +44,10 @@ append_interface() {
append args "-i $1"
}
+append_notinterface() {
+ append args "-I $1"
+}
+
dnsmasq() {
local cfg="$1"
append_bool "$cfg" authoritative "-K"
@@ -73,6 +77,7 @@ dnsmasq() {
append_parm "$cfg" "local" "-S"
config_list_foreach "$cfg" "server" append_server
config_list_foreach "$cfg" "interface" append_interface
+ config_list_foreach "$cfg" "notinterface" append_notinterface
append_parm "$cfg" "leasefile" "-l"
append_parm "$cfg" "resolvfile" "-r"
append_parm "$cfg" "tftp_root" "--tftp-root"