summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-04-27 09:06:30 +0000
committerRoy Marples <roy@marples.name>2009-04-27 09:06:30 +0000
commit338c93733d238f78cbad4b9d96f8592edf86af13 (patch)
tree76256a47a47a2e0735d754f1119034a755dd5ecc
parente70a1429564a8fce5036c351b010a47dbb6c28b7 (diff)
downloadopenrc-338c93733d238f78cbad4b9d96f8592edf86af13.tar.gz
openrc-338c93733d238f78cbad4b9d96f8592edf86af13.tar.bz2
openrc-338c93733d238f78cbad4b9d96f8592edf86af13.tar.xz
Fix the nstop keyword.
-rw-r--r--etc/rc.conf.in3
-rw-r--r--src/rc/rc.c8
2 files changed, 7 insertions, 4 deletions
diff --git a/etc/rc.conf.in b/etc/rc.conf.in
index eab9c53..55bcb38 100644
--- a/etc/rc.conf.in
+++ b/etc/rc.conf.in
@@ -59,9 +59,8 @@
#rc_start_wait=100
# rc_nostop is a list of services which will not stop when changing runlevels.
-# Network clients may wish to add network to the list.
# This still allows the service itself to be stopped when called directly.
-#rc_nostop="network"
+#rc_nostop=""
# rc will attempt to start crashed services by default.
# However, it will not stop them by default as that could bring down other
diff --git a/src/rc/rc.c b/src/rc/rc.c
index 0a4fba1..0be7901 100644
--- a/src/rc/rc.c
+++ b/src/rc/rc.c
@@ -607,8 +607,10 @@ do_stop_services(const char *newlevel, bool parallel)
else
nstop = false;
rc_stringlist_free(kwords);
- if (nstop)
+ if (nstop) {
+ rc_service_mark(service->value, RC_SERVICE_FAILED);
continue;
+ }
/* If the service has crashed, skip futher checks and just stop
it */
@@ -687,7 +689,9 @@ do_start_services(bool parallel)
TAILQ_FOREACH(service, start_services, entries) {
state = rc_service_state(service->value);
- if (!(state & (RC_SERVICE_STOPPED | RC_SERVICE_FAILED))) {
+ if (state & RC_SERVICE_FAILED)
+ continue;
+ if (!(state & RC_SERVICE_STOPPED)) {
if (crashed &&
rc_service_daemons_crashed(service->value))
rc_service_mark(service->value,