Warn about stopping sysinit services, thanks to Matthias Schwarzott. Fixes #126.
This commit is contained in:
parent
bdb3485b49
commit
6bf0289f33
@ -965,9 +965,12 @@ svc_stop(bool deps)
|
|||||||
hook_out = RC_HOOK_SERVICE_STOP_OUT;
|
hook_out = RC_HOOK_SERVICE_STOP_OUT;
|
||||||
rc_plugin_run(RC_HOOK_SERVICE_STOP_IN, applet);
|
rc_plugin_run(RC_HOOK_SERVICE_STOP_IN, applet);
|
||||||
|
|
||||||
if (!rc_runlevel_stopping() &&
|
if (!rc_runlevel_stopping()) {
|
||||||
rc_service_in_runlevel(service, RC_LEVEL_BOOT))
|
if (rc_service_in_runlevel(service, RC_LEVEL_SYSINIT))
|
||||||
ewarn ("WARNING: you are stopping a boot service");
|
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)) {
|
if (deps && !(state & RC_SERVICE_WASINACTIVE)) {
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user