From patchwork Fri Oct 4 07:57:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Kjaergaard X-Patchwork-Id: 280480 X-Patchwork-Delegate: esben@haabendal.dk Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [IPv6:2001:878:346::102]) by ozlabs.org (Postfix) with ESMTP id 809B92C010A for ; Fri, 4 Oct 2013 17:57:37 +1000 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id 1853B3FC19 for ; Fri, 4 Oct 2013 09:57:36 +0200 (CEST) X-Original-To: dev@oe-lite.org Delivered-To: dev@oe-lite.org Received: from mail02.prevas.se (mail02.prevas.se [62.95.78.10]) by hugin.dotsrc.org (Postfix) with ESMTPS id CC2F5447E4 for ; Fri, 4 Oct 2013 09:57:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=prevas.dk; i=@prevas.dk; l=2659; q=dns/txt; s=ironport2; t=1380873453; x=1412409453; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=XFrDZbFKyzmm1PDDnDzp6um4O3BdNTE9jwzoIn+mKYg=; b=Ht1Yau1VchJSzzyLNUrjM4MIOFrkCvlLCYv9qDyt4adzosos+tbyiEX0 xByp3lJIaxRToJlOrmJqqbtXwS/0qyK96o8ByT6wT4F3iHdGBLIRu9+Z6 oXlncZ5ctvAFa3qhqtbUlNJN3RsivhH1KhKxb5E+1MAl/v9lmI15fv4CZ c=; X-IronPort-AV: E=Sophos;i="4.90,1031,1371074400"; d="scan'208";a="3746986" Received: from vmprevas3.prevas.se (HELO smtp.prevas.se) ([172.16.8.103]) by ironport2.prevas.se with ESMTP/TLS/AES128-SHA; 04 Oct 2013 09:57:33 +0200 Received: from arh116.prevas.se (172.16.11.15) by smtp.prevas.se (172.16.8.105) with Microsoft SMTP Server (TLS) id 14.2.347.0; Fri, 4 Oct 2013 09:57:33 +0200 From: To: Subject: [base 3/3] busybox: fixup restart option in initscripts Date: Fri, 4 Oct 2013 09:57:25 +0200 Message-ID: <1380873445-546-3-git-send-email-jabk@prevas.dk> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1380873445-546-1-git-send-email-jabk@prevas.dk> References: <1380873445-546-1-git-send-email-jabk@prevas.dk> MIME-Version: 1.0 X-Originating-IP: [172.16.11.15] X-BeenThere: dev@oe-lite.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: OE-lite development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dev-bounces@oe-lite.org Errors-To: dev-bounces@oe-lite.org From: Jacob Kjaergaard --- recipes/busybox/files/busybox-crond | 5 +++-- recipes/busybox/files/busybox-httpd | 5 +++-- recipes/busybox/files/busybox-udhcpd | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/recipes/busybox/files/busybox-crond b/recipes/busybox/files/busybox-crond index 9c4a218..6d68ff3 100755 --- a/recipes/busybox/files/busybox-crond +++ b/recipes/busybox/files/busybox-crond @@ -3,6 +3,7 @@ DAEMON=/usr/sbin/crond NAME=crond DESC="Busybox Periodic Command Scheduler" ARGS="" +PIDFILE=/var/run/busybox-crond.pid test -f $DAEMON || exit 0 @@ -12,12 +13,12 @@ case "$1" in start) splash_progress PLACEHOLDER echo -n "starting $DESC: $NAME... " - start-stop-daemon -S -b -n $NAME -a $DAEMON -- $ARGS + start-stop-daemon -S -b -m -p $PIDFILE -a $DAEMON -- $ARGS echo "done." ;; stop) echo -n "stopping $DESC: $NAME... " - start-stop-daemon -K -n $NAME + start-stop-daemon -K -p $PIDFILE echo "done." ;; restart) diff --git a/recipes/busybox/files/busybox-httpd b/recipes/busybox/files/busybox-httpd index 9632d6b..d82b635 100755 --- a/recipes/busybox/files/busybox-httpd +++ b/recipes/busybox/files/busybox-httpd @@ -4,6 +4,7 @@ NAME=httpd DESC="Busybox HTTP Daemon" HTTPROOT="/srv/www" ARGS="-h $HTTPROOT" +PIDFILE=/var/run/httpd.pid test -f $DAEMON || exit 0 @@ -17,12 +18,12 @@ case "$1" in exit 1 fi splash_progress PLACEHOLDER - start-stop-daemon -S -b -n $NAME -a $DAEMON -- $ARGS + start-stop-daemon -S -b -m -p $PIDFILE -a $DAEMON -- $ARGS echo "done." ;; stop) echo -n "stopping $DESC: $NAME... " - start-stop-daemon -K -n $NAME + start-stop-daemon -K -p $PIDFILE echo "done." ;; restart) diff --git a/recipes/busybox/files/busybox-udhcpd b/recipes/busybox/files/busybox-udhcpd index c43903e..203bd13 100755 --- a/recipes/busybox/files/busybox-udhcpd +++ b/recipes/busybox/files/busybox-udhcpd @@ -3,6 +3,7 @@ DAEMON=/usr/sbin/udhcpd NAME=udhcpd DESC="Busybox UDHCP Server" ARGS="/etc/udhcpd.conf" +PIDFILE=/var/run/udhcpd.pid test -f $DAEMON || exit 1 @@ -15,12 +16,12 @@ case "$1" in echo "error: /etc/udhcpd.conf is missing." exit 1 fi - /sbin/start-stop-daemon -S -b -n $NAME -a $DAEMON -- $ARGS + /sbin/start-stop-daemon -S -b -m -p $PIDFILE -a $DAEMON -- $ARGS echo "done." ;; stop) echo -n "stopping $DESC: $NAME... " - /sbin/start-stop-daemon -K -n $NAME + /sbin/start-stop-daemon -K -p $PIDFILE echo "done." ;; restart)