diff options
author | Roy Marples <roy@marples.name> | 2008-11-03 15:31:01 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-11-03 15:31:01 +0000 |
commit | 0af7d5bc204cd6b7d03f22aacf4072c5f526c0ee (patch) | |
tree | aa819c4140f8c34bd3814ae5894a8b6214fff914 /src/librc | |
parent | 895c4f41492199d6aee75bb6c5a935134d67c29e (diff) |
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.
Diffstat (limited to 'src/librc')
-rw-r--r-- | src/librc/librc-depend.c | 6 | ||||
-rw-r--r-- | src/librc/rc.h.in | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/librc/librc-depend.c b/src/librc/librc-depend.c index 739e6fc1..2c05ea1e 100644 --- a/src/librc/librc-depend.c +++ b/src/librc/librc-depend.c @@ -189,7 +189,8 @@ valid_service(const char *runlevel, const char *service, const char *type) if (rc_service_in_runlevel(service, runlevel)) return true; - if (strcmp(runlevel, RC_LEVEL_SYSINIT) != 0 && + if (strcmp(runlevel, RC_LEVEL_SHUTDOWN) != 0 && + strcmp(runlevel, RC_LEVEL_SYSINIT) != 0 && strcmp(runlevel, bootlevel) != 0) { if (rc_service_in_runlevel(service, bootlevel)) @@ -499,8 +500,7 @@ rc_deptree_order(const RC_DEPTREE *deptree, const char *runlevel, int options) /* When shutting down, list all running services */ if (strcmp(runlevel, RC_LEVEL_SINGLE) == 0 || - strcmp(runlevel, RC_LEVEL_SHUTDOWN) == 0 || - strcmp(runlevel, RC_LEVEL_REBOOT) == 0) + strcmp(runlevel, RC_LEVEL_SHUTDOWN) == 0) { list = rc_services_in_state(RC_SERVICE_STARTED); list2 = rc_services_in_state(RC_SERVICE_INACTIVE); diff --git a/src/librc/rc.h.in b/src/librc/rc.h.in index 92fb19c7..6f7c64e0 100644 --- a/src/librc/rc.h.in +++ b/src/librc/rc.h.in @@ -70,7 +70,6 @@ typedef TAILQ_HEAD(rc_stringlist, rc_string) RC_STRINGLIST; #define RC_LEVEL_SYSINIT "sysinit" #define RC_LEVEL_SINGLE "single" #define RC_LEVEL_SHUTDOWN "shutdown" -#define RC_LEVEL_REBOOT "reboot" /*! Return the current runlevel. * @return the current runlevel */ |