chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sysv-generator: initialize units before use to ensure correct ordering
[elogind.git]
/
src
/
sysv-generator
/
sysv-generator.c
diff --git
a/src/sysv-generator/sysv-generator.c
b/src/sysv-generator/sysv-generator.c
index f78ddebf4689d548369ce63ff085aa7ee7eb2288..2f24ef2561ba1eb2a7cb5733037936051f6529f3 100644
(file)
--- a/
src/sysv-generator/sysv-generator.c
+++ b/
src/sysv-generator/sysv-generator.c
@@
-755,6
+755,10
@@
static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
service->name = name;
service->path = fpath;
service->name = name;
service->path = fpath;
+ r = load_sysv(service);
+ if (r < 0)
+ continue;
+
r = hashmap_put(all_services, service->name, service);
if (r < 0)
return log_oom();
r = hashmap_put(all_services, service->name, service);
if (r < 0)
return log_oom();
@@
-939,10
+943,6
@@
int main(int argc, char *argv[]) {
}
HASHMAP_FOREACH(service, all_services, j) {
}
HASHMAP_FOREACH(service, all_services, j) {
- q = load_sysv(service);
- if (q < 0)
- continue;
-
q = fix_order(service, all_services);
if (q < 0)
continue;
q = fix_order(service, all_services);
if (q < 0)
continue;