From 3a13fb95abd5ccd0f3373d255ef06572e9b11d8c Mon Sep 17 00:00:00 2001
From: Travis Kemen <thepeople@openwrt.org>
Date: Sun, 14 Mar 2010 21:33:02 +0000
Subject: [PATCH] if readethers is set to true make sure /etc/ethers exists,
 closes #6740

SVN-Revision: 20220
---
 package/dnsmasq/files/dnsmasq.init | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init
index 64eededba5..d796f2269a 100644
--- a/package/dnsmasq/files/dnsmasq.init
+++ b/package/dnsmasq/files/dnsmasq.init
@@ -90,6 +90,9 @@ dnsmasq() {
 
 	config_get DOMAIN "$cfg" domain
 
+	config_get_bool readethers "$cfg" readethers
+	[ "$readethers" = "1" ] && [ -e "/etc/ethers" ] || touch /etc/ethers
+
 	config_get leasefile $cfg leasefile
 	[ -e "$leasefile" ] || touch "$leasefile"
 	config_get_bool cachelocal "$cfg" cachelocal 1
-- 
GitLab