summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorPhilip Prindeville <philipp@redfish-solutions.com>2017-03-14 12:58:37 -0600
committerHans Dedecker <dedeckeh@gmail.com>2017-03-18 17:37:24 +0100
commit8e0775197a3a3cdcf9653d62c5195120b830efa1 (patch)
tree6be1726cd9cf2b4b145d39325dfa632a3b12c9c5 /package
parent01337ba472d0661af1e3b397be3c40573e46ea69 (diff)
downloadmtk-20170518-8e0775197a3a3cdcf9653d62c5195120b830efa1.zip
mtk-20170518-8e0775197a3a3cdcf9653d62c5195120b830efa1.tar.gz
mtk-20170518-8e0775197a3a3cdcf9653d62c5195120b830efa1.tar.bz2
dnsmasq: don't point --resolv-file to default location unconditionally
If noresolv is set, we should not generate a --resolv-file parameter. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [minor cleanup]
Diffstat (limited to 'package')
-rw-r--r--package/network/services/dnsmasq/files/dnsmasq.init6
1 files changed, 3 insertions, 3 deletions
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 51b841b..1b3157e 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -661,7 +661,7 @@ dhcp_relay_add() {
dnsmasq_start()
{
- local cfg="$1" disabled
+ local cfg="$1" disabled resolvfile
config_get_bool disabled "$cfg" disabled 0
[ "$disabled" -gt 0 ] && return 0
@@ -766,7 +766,6 @@ dnsmasq_start()
config_list_foreach "$cfg" "addnhosts" append_addnhosts
config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain
append_parm "$cfg" "leasefile" "--dhcp-leasefile" "/tmp/dhcp.leases"
- append_parm "$cfg" "resolvfile" "--resolv-file" "/tmp/resolv.conf.auto"
append_parm "$cfg" "serversfile" "--servers-file"
append_parm "$cfg" "tftp_root" "--tftp-root"
append_parm "$cfg" "dhcp_boot" "--dhcp-boot"
@@ -788,7 +787,6 @@ dnsmasq_start()
config_get_bool readethers "$cfg" readethers
[ "$readethers" = "1" -a \! -e "/etc/ethers" ] && touch /etc/ethers
- config_get resolvfile $cfg resolvfile
config_get dhcpscript $cfg dhcpscript
config_get leasefile $cfg leasefile "/tmp/dhcp.leases"
@@ -802,6 +800,8 @@ dnsmasq_start()
[ -n "$resolvfile" -a \! -e "$resolvfile" ] && touch "$resolvfile"
fi
+ [ -n "$resolvfile" ] && xappend "--resolv-file=$resolvfile"
+
config_get hostsfile "$cfg" dhcphostsfile
[ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile"