Răsfoiți Sursa

dnsmasq: only enable tftp if the tftp root exists

Signed-off-by: Felix Fietkau <[email protected]>

SVN-Revision: 48760
Felix Fietkau 9 ani în urmă
părinte
comite
5e84051a0f
1 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 2 1
      package/network/services/dnsmasq/files/dnsmasq.init

+ 2 - 1
package/network/services/dnsmasq/files/dnsmasq.init

@@ -128,7 +128,8 @@ dnsmasq() {
 	append_bool "$cfg" dbus "--enable-dbus"
 	append_bool "$cfg" dbus "--enable-dbus"
 	append_bool "$cfg" boguspriv "--bogus-priv"
 	append_bool "$cfg" boguspriv "--bogus-priv"
 	append_bool "$cfg" expandhosts "--expand-hosts"
 	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" tftp_no_fail "--tftp-no-fail"
 	append_bool "$cfg" nonwildcard "--bind-dynamic"
 	append_bool "$cfg" nonwildcard "--bind-dynamic"
 	append_bool "$cfg" fqdn "--dhcp-fqdn"
 	append_bool "$cfg" fqdn "--dhcp-fqdn"