[systemd-commits] 2 commits - src/device.c src/service.c

Lennart Poettering lennart at kemper.freedesktop.org
Wed Aug 25 19:08:44 PDT 2010


 src/device.c  |    1 -
 src/service.c |   11 ++++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 42a097a2537878d90b00df88d36a8eeb6db5cef6
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Aug 26 04:08:28 2010 +0200

    service: if we cannot add an alias to a sysv service, ignore this and go on

diff --git a/src/service.c b/src/service.c
index d2ef1ad..1525aae 100644
--- a/src/service.c
+++ b/src/service.c
@@ -571,10 +571,10 @@ static int service_load_sysv_path(Service *s, const char *path) {
                                         else
                                                 r = unit_add_dependency_by_name_inverse(u, UNIT_AFTER, m, NULL, true);
 
-                                        free(m);
-
                                         if (r < 0)
-                                                goto finish;
+                                                log_error("[%s:%u] Failed to add LSB Provides name %s: %s. Ignoring.", path, line, m, strerror(-r));
+
+                                        free(m);
                                 }
 
                         } else if (startswith_no_case(t, "Required-Start:") ||
@@ -604,10 +604,11 @@ static int service_load_sysv_path(Service *s, const char *path) {
                                                 continue;
 
                                         r = unit_add_dependency_by_name(u, startswith_no_case(t, "X-Start-Before:") ? UNIT_BEFORE : UNIT_AFTER, m, NULL, true);
-                                        free(m);
 
                                         if (r < 0)
-                                                goto finish;
+                                                log_error("Failed to add dependency on %s, ignoring: %s", m, strerror(-r));
+
+                                        free(m);
                                 }
                         } else if (startswith_no_case(t, "Default-Start:")) {
                                 char *k, *d;
commit eb9e50de3ec59a86e782fec27d76a03789c22d33
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Aug 26 04:08:01 2010 +0200

    device: allow aliases on devices

diff --git a/src/device.c b/src/device.c
index bf032d0..2cbb81a 100644
--- a/src/device.c
+++ b/src/device.c
@@ -537,7 +537,6 @@ const UnitVTable device_vtable = {
         .no_instances = true,
         .no_snapshots = true,
         .no_isolate = true,
-        .no_alias = true,
 
         .init = device_init,
 


More information about the systemd-commits mailing list