diff options
Diffstat (limited to 'init/init.c')
-rwxr-xr-x | init/init.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/init/init.c b/init/init.c index bb27c4e..ef42e02 100755 --- a/init/init.c +++ b/init/init.c @@ -491,7 +491,7 @@ static struct command *get_first_command(struct action *act) { struct listnode *node; node = list_head(&act->commands); - if (!node) + if (!node || list_empty(&act->commands)) return NULL; return node_to_item(node, struct command, clist); @@ -651,6 +651,10 @@ static int check_startup_action(int nargs, char **args) ERROR("init startup failure\n"); exit(1); } + + /* signal that we hit this point */ + unlink("/dev/.booting"); + return 0; } @@ -710,6 +714,9 @@ int main(int argc, char **argv) mount("proc", "/proc", "proc", 0, NULL); mount("sysfs", "/sys", "sysfs", 0, NULL); + /* indicate that booting is in progress to background fw loaders, etc */ + close(open("/dev/.booting", O_WRONLY | O_CREAT, 0000)); + /* We must have some place other than / to create the * device nodes for kmsg and null, otherwise we won't * be able to remount / read-only later on. |