aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-02-25 09:24:24 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-02-25 09:24:24 +0000
commit7e0107c3ca760dce8f2ced55066f540a04191aac (patch)
tree1d451035eee0c851265e439fd3d4bdc9658044ed /package
parentf3349e14981fb4716a355bf9b53396f24562a7c1 (diff)
downloadmaster-187ad058-7e0107c3ca760dce8f2ced55066f540a04191aac.tar.gz
master-187ad058-7e0107c3ca760dce8f2ced55066f540a04191aac.tar.bz2
master-187ad058-7e0107c3ca760dce8f2ced55066f540a04191aac.zip
dnsmasq: only enable tftp if the tftp root exists
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48760 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/network/services/dnsmasq/files/dnsmasq.init3
1 files changed, 2 insertions, 1 deletions
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index db342e7c8e..504c4acf4c 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -128,7 +128,8 @@ dnsmasq() {
append_bool "$cfg" dbus "--enable-dbus"
append_bool "$cfg" boguspriv "--bogus-priv"
append_bool "$cfg" expandhosts "--expand-hosts"
- append_bool "$cfg" enable_tftp "--enable-tftp"
+ config_get tftp_root "$cfg" "tftp_root"
+ [ -d "$tftp_root" ] && append_bool "$cfg" enable_tftp "--enable-tftp"
append_bool "$cfg" tftp_no_fail "--tftp-no-fail"
append_bool "$cfg" nonwildcard "--bind-dynamic"
append_bool "$cfg" fqdn "--dhcp-fqdn"