From: Vasilis Tsiligiannis Date: Sun, 8 Aug 2010 10:53:28 +0000 (+0000) Subject: dnsmasq: Squelch a 'touch' error when no dhcp leases file is defined in config, thank... X-Git-Tag: reboot~19207 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f2ef7cc8af1a7a983c90355c47df7d4b361bb600;p=openwrt%2Fstaging%2Fblogic.git dnsmasq: Squelch a 'touch' error when no dhcp leases file is defined in config, thanks stsp (#7720) SVN-Revision: 22528 --- diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init index 010c54cf5333..fac2d8a72d0f 100644 --- a/package/dnsmasq/files/dnsmasq.init +++ b/package/dnsmasq/files/dnsmasq.init @@ -97,7 +97,7 @@ dnsmasq() { [ "$readethers" = "1" ] && [ -e "/etc/ethers" ] || touch /etc/ethers config_get leasefile $cfg leasefile - [ -e "$leasefile" ] || touch "$leasefile" + [ -n "$leasefile" ] && ([ -e "$leasefile" ] || touch "$leasefile") config_get_bool cachelocal "$cfg" cachelocal 1 config_get hostsfile "$cfg" dhcphostsfile