aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-02-14 19:42:53 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-02-14 19:42:53 +0000
commit65da314b7dca25d2f270c61d6bd80210b27a9355 (patch)
treea2c7954b657d655d4f8baaa7458fb3afda0d9353
parentc7f406065d5c5fe989f2006983bff87b6bf5a107 (diff)
downloadmaster-187ad058-65da314b7dca25d2f270c61d6bd80210b27a9355.tar.gz
master-187ad058-65da314b7dca25d2f270c61d6bd80210b27a9355.tar.bz2
master-187ad058-65da314b7dca25d2f270c61d6bd80210b27a9355.zip
dnsmasq: fix logic for creating missing files
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25540 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/dnsmasq/files/dnsmasq.init4
1 files changed, 2 insertions, 2 deletions
diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init
index 3e194afff8..cd5a78ae83 100644
--- a/package/dnsmasq/files/dnsmasq.init
+++ b/package/dnsmasq/files/dnsmasq.init
@@ -100,10 +100,10 @@ dnsmasq() {
config_get DOMAIN "$cfg" domain
config_get_bool readethers "$cfg" readethers
- [ "$readethers" = "1" ] && [ -e "/etc/ethers" ] || touch /etc/ethers
+ [ "$readethers" = "1" -a \! -e "/etc/ethers" ] && touch /etc/ethers
config_get leasefile $cfg leasefile
- [ -n "$leasefile" ] && [ -e "$leasefile" ] || touch "$leasefile"
+ [ -n "$leasefile" -a \! -e "$leasefile" ] && touch "$leasefile"
config_get_bool cachelocal "$cfg" cachelocal 1
config_get hostsfile "$cfg" dhcphostsfile