@@ -12,8 +12,6 @@ config dnsmasq
option nonegcache 0
option authoritative 1
option readethers 1
- option leasefile '/tmp/dhcp.leases'
- option resolvfile '/tmp/resolv.conf.auto'
#list server '/mycompany.local/1.2.3.4'
option nonwildcard 1 # bind to & keep track of interfaces
#list interface br-lan
@@ -12,7 +12,7 @@ ADD_WAN_FQDN=0
ADD_LOCAL_FQDN=""
BASECONFIGFILE="/var/etc/dnsmasq.conf"
-BASEHOSTFILE="/tmp/hosts/dhcp"
+BASEHOSTFILE="/var/run/hosts.d/dhcp"
TRUSTANCHORSFILE="/usr/share/dnsmasq/trust-anchors.conf"
TIMEVALIDFILE="/var/state/dnsmasqsec"
BASEDHCPSTAMPFILE="/var/run/dnsmasq"
@@ -848,7 +848,7 @@ dnsmasq_start()
config_list_foreach "$cfg" "notinterface" append_notinterface
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" "leasefile" "--dhcp-leasefile" "/var/run/dhcp.leases"
append_parm "$cfg" "serversfile" "--servers-file"
append_parm "$cfg" "tftp_root" "--tftp-root"
append_parm "$cfg" "dhcp_boot" "--dhcp-boot"
@@ -875,7 +875,7 @@ dnsmasq_start()
xappend "--dhcp-script=$DHCPSCRIPT"
fi
- config_get leasefile $cfg leasefile "/tmp/dhcp.leases"
+ config_get leasefile $cfg leasefile "/var/run/dhcp.leases"
[ -n "$leasefile" -a \! -e "$leasefile" ] && touch "$leasefile"
config_get_bool cachelocal "$cfg" cachelocal 1
- Change the hosts(5) files directory from /tmp/hosts/ to /var/run/hosts.d/ - Change the lease database path /tmp/dhcp.leases to /var/run/dhcp.leases - Remove "leasefile" and "resolvfile" options from default /etc/config/dhcp The motivation of this change is twofold; first to make the file and directory locations somewhat consistent with other parts of the system, second to reduce the emphasis on /etc/config/dhcp options that do not need to (and probably should not) get changed by the user for normal operation. Signed-off-by: Jo-Philipp Wich <jo@mein.io> --- package/network/services/dnsmasq/files/dhcp.conf | 2 -- package/network/services/dnsmasq/files/dnsmasq.init | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-)