Add a new shutdown runlevel, Gentoo #224537.

Split halt.sh into halt, killprocs, romount and savecache services.
The reboot runlevel is removed but mapped to shutdown.
The halt script should be moved to the sysvinit package.
This commit is contained in:
Roy Marples
2008-11-03 15:31:01 +00:00
parent 895c4f4149
commit 0af7d5bc20
19 changed files with 199 additions and 210 deletions

View File

@ -519,6 +519,9 @@ svc_exec(const char *arg1, const char *arg2)
}
execok = rc_waitpid(service_pid) == 0 ? true : false;
if (!execok && errno == ECHILD)
/* killall5 -9 could cause this */
execok = true;
service_pid = 0;
return execok;
@ -1008,8 +1011,6 @@ svc_stop(bool deps)
if (runlevel &&
(strcmp(runlevel,
RC_LEVEL_SHUTDOWN) == 0 ||
strcmp(runlevel,
RC_LEVEL_REBOOT) == 0 ||
strcmp(runlevel,
RC_LEVEL_SINGLE) == 0))
continue;