[OpenWrt-Devel] [PATCH] [procd] inittab: always proceed to next state

Sergiy Kibrik sakib at meta.ua
Wed Aug 19 12:57:44 EDT 2015

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 <sakib at meta.ua>
 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 <S|K> <param>\n");
-	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)
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list