summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-05-24 19:00:13 +0200
committerLennart Poettering <lennart@poettering.net>2010-05-24 19:00:13 +0200
commit0c565ed702d2b0ee4a584e9348b13a78fb002972 (patch)
tree76ae3d93b77d48969d102302584621f245b5e387 /src
parent8640e111358257bbdd19582c0cac6166e87bd277 (diff)
service: interpret suse/debian style X-Start-Before/X-Start-After
Diffstat (limited to 'src')
-rw-r--r--src/service.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/service.c b/src/service.c
index 2f699cd1e6..d557394c70 100644
--- a/src/service.c
+++ b/src/service.c
@@ -516,7 +516,9 @@ static int service_load_sysv_path(Service *s, const char *path) {
}
} else if (startswith(t, "Required-Start:") ||
- startswith(t, "Should-Start:")) {
+ startswith(t, "Should-Start:") ||
+ startswith(t, "X-Start-Before:") ||
+ startswith(t, "X-Start-After:")) {
char *i, *w;
size_t z;
@@ -539,7 +541,7 @@ static int service_load_sysv_path(Service *s, const char *path) {
if (r == 0)
continue;
- r = unit_add_dependency_by_name(u, UNIT_AFTER, m, NULL, true);
+ r = unit_add_dependency_by_name(u, startswith(t, "X-Start-Before:") ? UNIT_BEFORE : UNIT_AFTER, m, NULL, true);
free(m);
if (r < 0)