From patchwork Sat Mar 29 09:01:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Zacarias X-Patchwork-Id: 334941 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 6FFE51400AC for ; Sat, 29 Mar 2014 20:01:23 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A76FA8BCB0; Sat, 29 Mar 2014 09:01:22 +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 7zpGvYuW0HPn; Sat, 29 Mar 2014 09:01:20 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 749B88B0E7; Sat, 29 Mar 2014 09:01:20 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 429DE1BFA2D for ; Sat, 29 Mar 2014 09:01:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3C6058B631 for ; Sat, 29 Mar 2014 09:01:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id orH-AptiwkOL for ; Sat, 29 Mar 2014 09:01:18 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from loknar.toptech.com.ar (loknar.toptech.com.ar [78.46.79.162]) by whitealder.osuosl.org (Postfix) with ESMTPS id CE7588B3CE for ; Sat, 29 Mar 2014 09:01:17 +0000 (UTC) Received: from asgard (host107.181-14-143.telecom.net.ar [181.14.143.107]) (authenticated bits=0) by loknar.toptech.com.ar (8.14.8/8.14.8) with ESMTP id s2T918ah002460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 29 Mar 2014 09:01:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zacarias.com.ar; s=dkey; t=1396083675; bh=rNJuhwFrQQFGs5tUVFF71fASMscCnYoG7R98GlvyQ00=; h=From:To:Cc:Subject:Date; b=omtjq9Ofe5wOXCnJK78VBLwbuxPG4a7+1LiWfvOvq9YSrCLDV8l/+m8DyAxnUfIOE B0LfRfk95z4UQIyvakt3RlMxFZyhU1a8ydANht+E2F2YV/9lNebGsSN0DcLj4ZsaFJ v5HE6HlPQy1RZsM0ld7wVxBHj1MMuCeoemrZumkU= Received: by asgard (sSMTP sendmail emulation); Sat, 29 Mar 2014 06:01:02 -0300 From: Gustavo Zacarias To: buildroot@busybox.net Date: Sat, 29 Mar 2014 06:01:02 -0300 Message-Id: <1396083662-8515-1-git-send-email-gustavo@zacarias.com.ar> X-Mailer: git-send-email 1.8.3.2 X-Virus-Scanned: clamav-milter 0.98.1 at loknar X-Virus-Status: Clean Subject: [Buildroot] [PATCH] dnsmasq: add sysv initscript X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Signed-off-by: Gustavo Zacarias --- package/dnsmasq/S80dnsmasq | 26 ++++++++++++++++++++++++++ package/dnsmasq/dnsmasq.mk | 5 +++++ 2 files changed, 31 insertions(+) create mode 100755 package/dnsmasq/S80dnsmasq diff --git a/package/dnsmasq/S80dnsmasq b/package/dnsmasq/S80dnsmasq new file mode 100755 index 0000000..2ff0206 --- /dev/null +++ b/package/dnsmasq/S80dnsmasq @@ -0,0 +1,26 @@ +#!/bin/sh + +[ -x /usr/sbin/dnsmasq ] || exit 0 +[ -f /etc/dnsmasq.conf ] || exit 0 + +case "$1" in + start) + echo -n "Starting dnsmasq: " + start-stop-daemon -S -x /usr/sbin/dnsmasq + [ $? == 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + echo -n "Stopping dnsmasq: " + start-stop-daemon -K -q -x /usr/sbin/dnsmasq + [ $? == 0 ] && echo "OK" || echo "FAIL" + ;; + restart|reload) + $0 stop + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit 0 diff --git a/package/dnsmasq/dnsmasq.mk b/package/dnsmasq/dnsmasq.mk index 9bf9b84..56d11ee 100644 --- a/package/dnsmasq/dnsmasq.mk +++ b/package/dnsmasq/dnsmasq.mk @@ -93,4 +93,9 @@ define DNSMASQ_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/var/lib/misc/ endef +define DNSMASQ_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/dnsmasq/S80dnsmasq \ + $(TARGET_DIR)/etc/init.d/S80dnsmasq +endef + $(eval $(generic-package))