From patchwork Tue Oct 13 09:35:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Beno=C3=AEt_Th=C3=A9baudeau?= X-Patchwork-Id: 529640 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 783311402D6 for ; Tue, 13 Oct 2015 20:35:52 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E117CA308B; Tue, 13 Oct 2015 09:35:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3gx4fXeo-NKv; Tue, 13 Oct 2015 09:35:48 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5074FA3063; Tue, 13 Oct 2015 09:35:48 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id DE4261CE568 for ; Tue, 13 Oct 2015 09:35:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id DAD87A3063 for ; Tue, 13 Oct 2015 09:35:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oGJIXRPiuhNu for ; Tue, 13 Oct 2015 09:35:45 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from authsmtp.register.it (authsmtp93.register.it [195.110.122.178]) by fraxinus.osuosl.org (Postfix) with ESMTP id B74DDA3062 for ; Tue, 13 Oct 2015 09:35:44 +0000 (UTC) Received: from rad-ubuntu.home ([90.49.67.218]) by paganini31 with id UZbd1r0164iYwqa01ZbjuJ; Tue, 13 Oct 2015 11:35:43 +0200 X-Rid: benoit@wsystem.com@90.49.67.218 From: =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= To: buildroot@buildroot.org Date: Tue, 13 Oct 2015 11:35:28 +0200 Message-Id: <1444728929-46246-7-git-send-email-benoit@wsystem.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1444728929-46246-1-git-send-email-benoit@wsystem.com> References: <1444728929-46246-1-git-send-email-benoit@wsystem.com> MIME-Version: 1.0 Cc: =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= Subject: [Buildroot] [PATCH v2 7/8] package/dhcp/S80dhcp-server: support IPv6 lease file X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The IPv6 lease file has a different name. Signed-off-by: Benoît Thébaudeau --- Changes v1 -> v2: - Rebase. --- package/dhcp/S80dhcp-server | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/dhcp/S80dhcp-server b/package/dhcp/S80dhcp-server index 1c2ff74..b6f76ee 100755 --- a/package/dhcp/S80dhcp-server +++ b/package/dhcp/S80dhcp-server @@ -25,7 +25,10 @@ case "$1" in start) printf "Starting DHCP server: " test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/ - test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases + for lease_file in /var/lib/dhcp/dhcpd.leases \ + /var/lib/dhcp/dhcpd6.leases; do + test -f "${lease_file}" || touch "${lease_file}" + done start-stop-daemon -S -q -x /usr/sbin/dhcpd -- -q $OPTIONS $INTERFACES [ $? = 0 ] && echo "OK" || echo "FAIL" ;;