Skip to content
Snippets Groups Projects
Commit 72967676 authored by Alberto Bursi's avatar Alberto Bursi Committed by Hans Dedecker
Browse files

dnsmasq: make tftp root if not existing


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: default avatarAlberto Bursi <alberto.bursi@outlook.it>
parent cd5cd7c8
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment