diff options
author | Roy Marples <roy@marples.name> | 2008-11-03 23:13:12 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-11-03 23:13:12 +0000 |
commit | 77d56f548913d2957cd837f9ebc31491aa07239e (patch) | |
tree | fb00516a95f80b068bff1c6d981ca99a10a9abff | |
parent | c520d4a23a2694427f31371c19889329155841d3 (diff) |
Avoid depends not in the runlevel for sysinit and shutdown.
-rw-r--r-- | src/librc/librc-depend.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librc/librc-depend.c b/src/librc/librc-depend.c index 2c05ea1e..62d7044c 100644 --- a/src/librc/librc-depend.c +++ b/src/librc/librc-depend.c @@ -189,10 +189,10 @@ 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_SHUTDOWN) != 0 && - strcmp(runlevel, RC_LEVEL_SYSINIT) != 0 && - strcmp(runlevel, bootlevel) != 0) - { + if (strcmp(runlevel, RC_LEVEL_SHUTDOWN) == 0 || + strcmp(runlevel, RC_LEVEL_SYSINIT) == 0) + return false; + if (strcmp(runlevel, bootlevel) != 0) { if (rc_service_in_runlevel(service, bootlevel)) return true; } |