diff options
author | Roy Marples <roy@marples.name> | 2009-04-26 21:16:05 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2009-04-26 21:16:05 +0000 |
commit | eaa32c75c9bba7af0ec842d82f56a6862bbc83db (patch) | |
tree | 74b4175dd95127d5819444807722e30dd3e5792d /src | |
parent | 2b866f264fa2ea9cda891018234414c4f4942eb8 (diff) |
Add the nostop keyword so that we don't stop the network init script by default.
Diffstat (limited to 'src')
-rw-r--r-- | src/rc/rc.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/rc/rc.c b/src/rc/rc.c index 0336264c..0a4fba11 100644 --- a/src/rc/rc.c +++ b/src/rc/rc.c @@ -577,10 +577,10 @@ do_stop_services(const char *newlevel, bool parallel) { pid_t pid; RC_STRING *service, *svc1, *svc2; - RC_STRINGLIST *deporder, *tmplist; + RC_STRINGLIST *deporder, *tmplist, *kwords; RC_SERVICE state; RC_STRINGLIST *nostop; - bool crashed; + bool crashed, nstop; if (!types_n) { types_n = rc_stringlist_new(); @@ -601,6 +601,14 @@ do_stop_services(const char *newlevel, bool parallel) rc_service_mark(service->value, RC_SERVICE_FAILED); continue; } + kwords = rc_deptree_depend(deptree, service->value, "keyword"); + if (rc_stringlist_find(kwords, "nostop")) + nstop = true; + else + nstop = false; + rc_stringlist_free(kwords); + if (nstop) + continue; /* If the service has crashed, skip futher checks and just stop it */ |