Look for either "init" or "linuxrc" processes
diff --git a/init/reboot.c b/init/reboot.c
index 35c147b..bdcd443 100644
--- a/init/reboot.c
+++ b/init/reboot.c
@@ -29,8 +29,11 @@
#ifdef BB_FEATURE_LINUXRC
/* don't assume init's pid == 1 */
pid_t *pid = find_pid_by_name("init");
- if (!pid || *pid<=0)
- error_msg_and_die("no process killed");
+ if (!pid || *pid<=0) {
+ pid_t *pid = find_pid_by_name("linuxrc");
+ if (!pid || *pid<=0)
+ error_msg_and_die("no process killed");
+ }
return(kill(*pid, SIGTERM));
#else
return(kill(1, SIGTERM));