[systemd-commits] 2 commits - fixme src/service.c
Lennart Poettering
lennart at kemper.freedesktop.org
Mon Sep 27 15:29:15 PDT 2010
fixme | 2 --
src/service.c | 15 +++++++++++++++
2 files changed, 15 insertions(+), 2 deletions(-)
New commits:
commit caca31b57621d4c5632e1fbf9ffa4259f05a13e5
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Sep 28 00:29:09 2010 +0200
service: shortcut sysv provides on ourselves
diff --git a/src/service.c b/src/service.c
index 6a4d350..021bc86 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);
commit cb33e400006806676baac91fb297185b179931c7
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Sep 28 00:28:16 2010 +0200
service: ignore sysv $null service
diff --git a/fixme b/fixme
index 09ea3a6..f11d0e0 100644
--- a/fixme
+++ b/fixme
@@ -101,8 +101,6 @@
* readahead: btrfs/LVM SSD detection
-* handle $null LSB header
-
* LSB provides should only create targets, never aliases
* d /var/run/screen 0755 root utmp
diff --git a/src/service.c b/src/service.c
index 5706d7c..6a4d350 100644
--- a/src/service.c
+++ b/src/service.c
@@ -280,6 +280,10 @@ static int sysv_translate_facility(const char *name, char **_r) {
unsigned i;
char *r;
+ /* SuSE insserv extension */
+ if (streq(name, "$null"))
+ return 0;
+
for (i = 0; i < ELEMENTSOF(table); i += 2)
if (streq(table[i], name)) {
if (!(r = strdup(table[i+1])))
More information about the systemd-commits
mailing list