From patchwork Wed May 2 16:02:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jo-Philipp Wich X-Patchwork-Id: 907618 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mein.io Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bGZoZLB1"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40bjkZ4THCz9ry1 for ; Thu, 3 May 2018 02:03:50 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7105D5+cz/A9HDwBjq1sKEwrAZ76c414fmgYi+DBv2M=; b=bGZoZLB1Mzir97 SrE5AVlELdkt8Lbt2n2OzvQB8RFgYK7JgUQa6rq0Kr1hHe/Ekh9Lzt+2DYiKHlMVbdaUQFpJSnHei ez3OslcpsxTv5/BLGEDcRcIsfZb2vNrfNP+trZHYlYUxK03a11iR0JhXLY9ndeqFVNgsQDK2QzGvR NIdfmyow5EAuvwwRpkHeEHzKY5rtmset9bV9luubbgp8GadIW/WIYxhHoDmeRjSV1E0n60gaH0/0w KyTTkWfxPobiEg/WFbj6xtzGeKJ6GVZ/LgLQ3yq8LzDSP7X7KrFlR5WdJGlhGzfbvr/QkMII7yPIy V5wbNALKG/h1Ta1Pe/Cg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fDuEL-0001IN-Qu; Wed, 02 May 2018 16:03:45 +0000 Received: from mxout01.bytecamp.net ([212.204.60.217]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fDuDp-0000jS-Bs for lede-dev@lists.infradead.org; Wed, 02 May 2018 16:03:15 +0000 Received: by mxout01.bytecamp.net (Postfix, from userid 1001) id 6FC56575ABF; Wed, 2 May 2018 18:02:58 +0200 (CEST) Received: from mail.bytecamp.net (mail.bytecamp.net [212.204.60.9]) by mxout01.bytecamp.net (Postfix) with ESMTP id 348D4575AE8 for ; Wed, 2 May 2018 18:02:58 +0200 (CEST) Received: (qmail 76635 invoked from network); 2 May 2018 18:02:58 +0200 Received: from unknown (HELO localhost.localdomain) (jo%wwsnet.net@213.61.250.146) by mail.bytecamp.net with ESMTPS (DHE-RSA-AES128-GCM-SHA256 encrypted); 2 May 2018 18:02:58 +0200 From: Jo-Philipp Wich To: lede-dev@lists.infradead.org Date: Wed, 2 May 2018 18:02:50 +0200 Message-Id: <20180502160251.16944-2-jo@mein.io> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180502160251.16944-1-jo@mein.io> References: <20180502160251.16944-1-jo@mein.io> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180502_090313_591197_26C37AC3 X-CRM114-Status: GOOD ( 10.79 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.204.60.217 listed in list.dnswl.org] Subject: [LEDE-DEV] [RFC PATCH 1/2] dnsmasq: adjust configuration defaults X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jo-Philipp Wich MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org - 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 --- package/network/services/dnsmasq/files/dhcp.conf | 2 -- package/network/services/dnsmasq/files/dnsmasq.init | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/package/network/services/dnsmasq/files/dhcp.conf b/package/network/services/dnsmasq/files/dhcp.conf index 360c7d79ee..3da0dbf3e9 100644 --- a/package/network/services/dnsmasq/files/dhcp.conf +++ b/package/network/services/dnsmasq/files/dhcp.conf @@ -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 diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 1881b2bcdc..121e26bc5e 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -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