From patchwork Mon Apr 16 02:29:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 898431 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.137; helo=fraxinus.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 fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40PXRh2JFNz9s1l for ; Mon, 16 Apr 2018 12:30:40 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6A0D6871E5; Mon, 16 Apr 2018 02:30:36 +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 1nqgxkvG1LYb; Mon, 16 Apr 2018 02:30:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 69EE987264; Mon, 16 Apr 2018 02:30:34 +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 65E831CF159 for ; Mon, 16 Apr 2018 02:30:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 61E8886B00 for ; Mon, 16 Apr 2018 02:30:18 +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 9iVQjNxAAXaA for ; Mon, 16 Apr 2018 02:30:18 +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 CC2EF86AF8 for ; Mon, 16 Apr 2018 02:30:17 +0000 (UTC) Received: from mail.datacom.ind.br (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTPS id 5F7161BA0366; Sun, 15 Apr 2018 23:30:16 -0300 (-03) Received: from localhost (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTP id 515301BA0348; Sun, 15 Apr 2018 23:30:16 -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 jQnPK766_GQz; Sun, 15 Apr 2018 23:30:16 -0300 (-03) Received: from p7-1130br.casantos.org (unknown [177.18.78.240]) by mail.datacom.ind.br (Postfix) with ESMTPSA id 6F3A21BA034C; Sun, 15 Apr 2018 23:30:15 -0300 (-03) From: Carlos Santos To: buildroot@buildroot.org Date: Sun, 15 Apr 2018 23:29:40 -0300 Message-Id: <20180416022944.13644-23-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 22/26] tpm2-abrmd: 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. Buildroot installs both abrmd and its init script as part of the same package. But if it ever happens for some reason, the error message from start-stop-daemon should be pretty clear. Signed-off-by: Carlos Santos --- package/tpm2-abrmd/S80tpm2-abrmd | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/package/tpm2-abrmd/S80tpm2-abrmd b/package/tpm2-abrmd/S80tpm2-abrmd index 3db5e6fa1d..d54c220c04 100755 --- a/package/tpm2-abrmd/S80tpm2-abrmd +++ b/package/tpm2-abrmd/S80tpm2-abrmd @@ -3,14 +3,10 @@ my_name="$0" check_required_files() { - [ -x "$1" ] || { + [ -f "$1" ] || { echo "$my_name: $1 is missing" exit 1 } - [ -z "$2" ] || [ -f "$2" ] || { - echo "$my_name: $2 is missing" - exit 1 - } } check_device() { @@ -50,7 +46,7 @@ stop() { echo "OK" } -check_required_files /usr/sbin/tpm2-abrmd /etc/dbus-1/system.d/tpm2-abrmd.conf +check_required_files /etc/dbus-1/system.d/tpm2-abrmd.conf # defaults DAEMON_OPTS="--tcti=device --logger=syslog --max-connections=20 --max-transient-objects=20 --fail-on-loaded-trans"