summaryrefslogtreecommitdiff
path: root/src/service.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-09-28 00:29:09 +0200
committerLennart Poettering <lennart@poettering.net>2010-09-28 00:29:09 +0200
commitcaca31b57621d4c5632e1fbf9ffa4259f05a13e5 (patch)
tree80d760c438e794d6f475fd13c54b6c103b205fee /src/service.c
parentcb33e400006806676baac91fb297185b179931c7 (diff)
service: shortcut sysv provides on ourselves
Diffstat (limited to 'src/service.c')
-rw-r--r--src/service.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/service.c b/src/service.c
index 6a4d350c9f..021bc86766 100644
--- a/src/service.c
+++ b/src/service.c
@@ -293,6 +293,7 @@ static int sysv_translate_facility(const char *name, char **_r) {
}
if (*name == '$')
+ /* This is a heuristic. */
r = unit_name_build(name+1, NULL, ".target");
else
r = sysv_translate_name(name);
@@ -585,6 +586,11 @@ static int service_load_sysv_path(Service *s, const char *path) {
goto finish;
}
+ if (streq(n, file_name_from_path(path))) {
+ free(n);
+ continue;
+ }
+
r = sysv_translate_facility(n, &m);
free(n);
@@ -630,6 +636,11 @@ static int service_load_sysv_path(Service *s, const char *path) {
goto finish;
}
+ if (streq(n, file_name_from_path(path))) {
+ free(n);
+ continue;
+ }
+
r = sysv_translate_facility(n, &m);
free(n);