From patchwork Mon Apr 16 02:29:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 898426 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=datacom.ind.br Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40PXRY52Twz9s08 for ; Mon, 16 Apr 2018 12:30:33 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id D95E923A10; Mon, 16 Apr 2018 02:30:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 37y7TOoWmhur; Mon, 16 Apr 2018 02:30:29 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 508B322DB2; Mon, 16 Apr 2018 02:30:29 +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 B830F1CF159 for ; Mon, 16 Apr 2018 02:30:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id B3B5486B00 for ; Mon, 16 Apr 2018 02:30:15 +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 nQMjzK1VRTwH for ; Mon, 16 Apr 2018 02:30:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.datacom.ind.br (mx.datacom.ind.br [177.66.5.10]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 2249E86AF8 for ; Mon, 16 Apr 2018 02:30:15 +0000 (UTC) Received: from mail.datacom.ind.br (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTPS id AA8671BA034E; Sun, 15 Apr 2018 23:30:13 -0300 (-03) Received: from localhost (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTP id 9C1E81BA0348; Sun, 15 Apr 2018 23:30:13 -0300 (-03) Received: from mail.datacom.ind.br ([127.0.0.1]) by localhost (mail.datacom.ind.br [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 7PCnfrkuSweJ; Sun, 15 Apr 2018 23:30:13 -0300 (-03) Received: from p7-1130br.casantos.org (unknown [177.18.78.240]) by mail.datacom.ind.br (Postfix) with ESMTPSA id B71AB1BA037D; Sun, 15 Apr 2018 23:30:12 -0300 (-03) From: Carlos Santos To: buildroot@buildroot.org Date: Sun, 15 Apr 2018 23:29:37 -0300 Message-Id: <20180416022944.13644-20-casantos@datacom.ind.br> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180416022944.13644-1-casantos@datacom.ind.br> References: <20180416022944.13644-1-casantos@datacom.ind.br> Subject: [Buildroot] [PATCH 19/26] prosody: don't test if the binary exists in the init script X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bernd Kuhls , John Stile , Aleksander Morgado , Simon Dawson , Eric Le Bihan , Dushara Jayasinghe , "Yann E . MORIN" MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The test doesn't make sense. It just exits without any error if the binary doesn't exist, which is silly. Replace the DAEMON variable, which was used only once, by the full path of the binary file. Signed-off-by: Carlos Santos --- package/prosody/S50prosody | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/package/prosody/S50prosody b/package/prosody/S50prosody index 84913a5f83..6fd33671fa 100644 --- a/package/prosody/S50prosody +++ b/package/prosody/S50prosody @@ -1,7 +1,6 @@ #! /bin/sh NAME=prosody -DAEMON=/usr/bin/$NAME # This must match the pidfile field in # /etc/prosody/prosody.cfg.lua @@ -9,15 +8,12 @@ DAEMON=/usr/bin/$NAME PIDDIR=/var/run/$NAME PIDFILE=$PIDDIR/$NAME.pid -# Gracefully exit if the package has been removed. -test -x $DAEMON || exit 0 - case "$1" in start) printf "Starting $NAME: " mkdir -p $PIDDIR chown $NAME:$NAME $PIDDIR - start-stop-daemon -S -q -o -x $DAEMON -c $NAME + start-stop-daemon -S -q -o -x /usr/bin/prosody -c $NAME [ $? = 0 ] && echo "OK" || echo "FAIL" ;; stop)