Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mail.openembedded.org (Postfix) with ESMTP id E508E71A74 for ; Wed, 5 Oct 2016 14:11:12 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP; 05 Oct 2016 07:11:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,449,1473145200"; d="scan'208";a="886982353" Received: from marquiz.fi.intel.com ([10.237.72.155]) by orsmga003.jf.intel.com with ESMTP; 05 Oct 2016 07:11:09 -0700 From: Markus Lehtonen To: openembedded-core@lists.openembedded.org Date: Wed, 5 Oct 2016 17:11:07 +0300 Message-Id: <1475676667-24280-1-git-send-email-markus.lehtonen@linux.intel.com> X-Mailer: git-send-email 2.6.6 Subject: [PATCH] update-rc.d.bbclass: check that init script exists before running it X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 14:11:14 -0000 Check that the init script that is going to be called in the prerm() script really exists. There might be a packaging bug or the script might've been removed already earlier in prerm(). [YOCTO #10299] Signed-off-by: Markus Lehtonen --- meta/classes/update-rc.d.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass index dfef2a2..24da547 100644 --- a/meta/classes/update-rc.d.bbclass +++ b/meta/classes/update-rc.d.bbclass @@ -37,7 +37,7 @@ fi } updatercd_prerm() { -if [ -z "$D" ]; then +if [ -z "$D" -a -f "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then ${INIT_D_DIR}/${INITSCRIPT_NAME} stop fi } -- 2.6.6