diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-04-23 23:36:52 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-04-23 23:36:52 +0200 |
commit | a0fcc5f6ce46ae69649f42e844249c54aa1e7b2e (patch) | |
tree | b021c2a4f67cfd16ebb70e995084bf6211ff941c /service.c | |
parent | 8d025b231b97da7b5cf908309f23e5af78bae4a4 (diff) |
service: make sure sysv services keep a ref on shutdown.target so that it doesn't get GC'd
Diffstat (limited to 'service.c')
-rw-r--r-- | service.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2253,7 +2253,7 @@ static int service_enumerate(Manager *m) { if ((r = unit_add_dependency(runlevel_target, UNIT_WANTS, service, true)) < 0) goto finish; - if ((r = unit_add_dependency(runlevel_target, UNIT_AFTER, service, true)) < 0) + if ((r = unit_add_dependency(service, UNIT_BEFORE, runlevel_target, true)) < 0) goto finish; } else if (de->d_name[0] == 'K' && @@ -2276,10 +2276,10 @@ static int service_enumerate(Manager *m) { if ((r = manager_load_unit(m, SPECIAL_SHUTDOWN_TARGET, NULL, &shutdown_target)) < 0) goto finish; - if ((r = unit_add_dependency(shutdown_target, UNIT_CONFLICTS, service, true)) < 0) + if ((r = unit_add_dependency(service, UNIT_CONFLICTS, shutdown_target, true)) < 0) goto finish; - if ((r = unit_add_dependency(shutdown_target, UNIT_BEFORE, service, true)) < 0) + if ((r = unit_add_dependency(service, UNIT_BEFORE, shutdown_target, true)) < 0) goto finish; } } |