From patchwork Wed Aug 19 16:57:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergiy Kibrik X-Patchwork-Id: 508781 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id DCE23140549 for ; Thu, 20 Aug 2015 02:58:23 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 2388E28AE0F; Wed, 19 Aug 2015 18:57:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 8F2EC28A98C for ; Wed, 19 Aug 2015 18:57:14 +0200 (CEST) X-policyd-weight: using cached result; rate: -8.5 Received: from smtp.meta.ua (smtp.meta.ua [194.0.131.41]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Wed, 19 Aug 2015 18:57:14 +0200 (CEST) Received: from bargainingless-net.volia.net ([93.73.27.29]:53357 helo=localhost) by smtp.meta.ua with esmtpsa id 1ZS6ga-0000dp-0A by authid ; Wed, 19 Aug 2015 19:58:01 +0300 Received: by localhost (sSMTP sendmail emulation); Wed, 19 Aug 2015 19:58:01 +0300 From: Sergiy Kibrik To: openwrt-devel@lists.openwrt.org Date: Wed, 19 Aug 2015 19:57:44 +0300 Message-Id: <1440003464-8533-1-git-send-email-sakib@meta.ua> X-Mailer: git-send-email 1.9.1 X-MUA-GeoIP: UA X-Gen: 9f446688d9aacb625aeb66db7248a3b8 Cc: Sergiy Kibrik Subject: [OpenWrt-Devel] [PATCH] [procd] inittab: always proceed to next state X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" If no S or K rc scripts provided we still should be able to go on to next state, or we won't boot properly and would not be able to reboot/shutdown later. Signed-off-by: Sergiy Kibrik --- inittab.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inittab.c b/inittab.c index eb402f8..f8f0218 100644 --- a/inittab.c +++ b/inittab.c @@ -151,7 +151,10 @@ static void runrc(struct init_action *a) ERROR("valid format is rcS \n"); return; } - rcS(a->argv[1], a->argv[2], rcdone); + + /* proceed even if no init or shutdown scripts run */ + if (rcS(a->argv[1], a->argv[2], rcdone)) + rcdone(NULL); } static void askfirst(struct init_action *a)