Skip to content

Commit

Permalink
dnsmasq: make tftp root if not existing
Browse files Browse the repository at this point in the history
If there's a TFTP root directory configured, create it with mkdir -p
(which does not throw an error if the folder exists already)
before starting dnsmasq. This is useful for TFTP roots in /tmp, for example.

Originally submitted by nfw user aka Nathaniel Wesley Filardo

Signed-off-by: Alberto Bursi <[email protected]>
  • Loading branch information
bobafetthotmail authored and dedeckeh committed May 4, 2017
1 parent cd5cd7c commit 7296767
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package/network/services/dnsmasq/files/dnsmasq.init
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ dnsmasq_start()
append_bool "$cfg" dbus "--enable-dbus"
append_bool "$cfg" expandhosts "--expand-hosts"
config_get tftp_root "$cfg" "tftp_root"
[ -d "$tftp_root" ] && append_bool "$cfg" enable_tftp "--enable-tftp"
[ -n "$tftp_root" ] && mkdir -p "$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"
Expand Down

0 comments on commit 7296767

Please sign in to comment.