aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-12-11 14:50:58 +0000
committerRoy Marples <roy@marples.name>2008-12-11 14:50:58 +0000
commit6bf0289f332564c65bac9dc37fa81518220926ef (patch)
tree7bee76899eec1edb512695a7ac2e07403d0d9b25
parentbdb3485b49fe9fe43900cd80809ffc534e91db11 (diff)
Warn about stopping sysinit services, thanks to Matthias Schwarzott. Fixes #126.
-rw-r--r--src/rc/runscript.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/rc/runscript.c b/src/rc/runscript.c
index 1ca8f464..9178cdcd 100644
--- a/src/rc/runscript.c
+++ b/src/rc/runscript.c
@@ -965,9 +965,12 @@ svc_stop(bool deps)
hook_out = RC_HOOK_SERVICE_STOP_OUT;
rc_plugin_run(RC_HOOK_SERVICE_STOP_IN, applet);
- if (!rc_runlevel_stopping() &&
- rc_service_in_runlevel(service, RC_LEVEL_BOOT))
- ewarn ("WARNING: you are stopping a boot service");
+ if (!rc_runlevel_stopping()) {
+ if (rc_service_in_runlevel(service, RC_LEVEL_SYSINIT))
+ ewarn ("WARNING: you are stopping a sysinit service");
+ else if (rc_service_in_runlevel(service, RC_LEVEL_BOOT))
+ ewarn ("WARNING: you are stopping a boot service");
+ }
if (deps && !(state & RC_SERVICE_WASINACTIVE)) {
errno = 0;