inittab: always proceed to next state
authorSergiy Kibrik <sakib@meta.ua>
Wed, 19 Aug 2015 16:57:44 +0000 (19:57 +0300)
committerJohn Crispin <blogic@openwrt.org>
Tue, 15 Sep 2015 05:23:32 +0000 (07:23 +0200)
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@meta.ua>
inittab.c

index eb402f8..f8f0218 100644 (file)
--- 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");
                return;
        }
                ERROR("valid format is rcS <S|K> <param>\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)
 }
 
 static void askfirst(struct init_action *a)