From 371ca19f5346d626f0c75c8d53aa5e3fb2e85c43 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 3 Oct 2001 21:26:12 +0000 Subject: Look for either "init" or "linuxrc" processes --- init/poweroff.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'init/poweroff.c') diff --git a/init/poweroff.c b/init/poweroff.c index 8bb20e9bb..eba51342c 100644 --- a/init/poweroff.c +++ b/init/poweroff.c @@ -29,8 +29,11 @@ extern int poweroff_main(int argc, char **argv) #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, SIGUSR2)); #else return(kill(1, SIGUSR2)); -- cgit v1.2.3