dnsmasq: Squelch a 'touch' error when no dhcp leases file is defined in config, thank...
authorVasilis Tsiligiannis <acinonyx@openwrt.gr>
Sun, 8 Aug 2010 10:53:28 +0000 (10:53 +0000)
committerVasilis Tsiligiannis <acinonyx@openwrt.gr>
Sun, 8 Aug 2010 10:53:28 +0000 (10:53 +0000)
SVN-Revision: 22528

package/dnsmasq/files/dnsmasq.init

index 010c54cf533363f5cd33f30760bafa6361f9398d..fac2d8a72d0f9140a718e7ff6f551535edc3dbfc 100644 (file)
@@ -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