summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-04 22:51:16 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-04 22:51:16 +0200
commit0fd030bea1afa032d9afc791db4165a6848604b8 (patch)
tree0768b3e5b7784cb829b0e19270ac9d88fe0bd7a4
parent8cb45bf8df4d1fab4386bce349a1437443a9b0eb (diff)
sysv: require sysinit.service from all sysv services
-rw-r--r--manager.h1
-rw-r--r--service.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/manager.h b/manager.h
index 8d46323e0e..a361748374 100644
--- a/manager.h
+++ b/manager.h
@@ -82,6 +82,7 @@ struct Watch {
#define SPECIAL_REMOTE_FS_TARGET "remote-fs.target"
#define SPECIAL_SYSLOG_TARGET "syslog.target" /* Should pull in syslog.socket or syslog.service */
#define SPECIAL_RTC_SET_TARGET "rtc-set.target" /* LSB's $time */
+#define SPECIAL_SYSINIT_SERVICE "sysinit.service"
/* For SysV compatibility. Usually an alias for a saner target. On
* SysV-free systems this doesn't exist. */
diff --git a/service.c b/service.c
index be23b57c49..53d5505c2e 100644
--- a/service.c
+++ b/service.c
@@ -481,6 +481,10 @@ static int service_load_sysv_path(Service *s, const char *path) {
if ((r = sysv_exec_commands(s)) < 0)
goto finish;
+ if ((r = unit_add_dependency_by_name(u, UNIT_REQUIRES, SPECIAL_SYSINIT_SERVICE)) < 0 ||
+ (r = unit_add_dependency_by_name(u, UNIT_AFTER, SPECIAL_SYSINIT_SERVICE)) < 0)
+ goto finish;
+
r = 1;
finish: