]> err.no Git - systemd/commitdiff
service: if we cannot add an alias to a sysv service, ignore this and go on
authorLennart Poettering <lennart@poettering.net>
Thu, 26 Aug 2010 02:08:28 +0000 (04:08 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 26 Aug 2010 02:08:28 +0000 (04:08 +0200)
src/service.c

index d2ef1ad9070e11993ec103d1b16e04d42881b4f5..1525aaea9e0acf4f1383fb115791a6db64666b8c 100644 (file)
@@ -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;