chiark / gitweb /
service: don't create sysv order deps on merged units
[elogind.git] / src / service.c
index 797f28577408e5adbce0409b1d5063bff6e00435..5706d7c490273d1a2269e6f37309e4d3e336bff9 100644 (file)
@@ -239,9 +239,9 @@ static char *sysv_translate_name(const char *name) {
                 /* Drop Debian-style .sh suffix */
                 strcpy(stpcpy(r, name) - 3, ".service");
 #ifdef TARGET_ARCH
-       else if (startswith(name, "@"))
-               /* Drop Arch-style background prefix */
-               strcpy(stpcpy(r, name + 1), ".service");
+        else if (startswith(name, "@"))
+                /* Drop Arch-style background prefix */
+                strcpy(stpcpy(r, name + 1), ".service");
 #endif
         else
                 /* Normal init scripts */
@@ -326,6 +326,9 @@ static int sysv_fix_order(Service *s) {
                 if (s == t)
                         continue;
 
+                if (t->meta.load_state != UNIT_LOADED)
+                        continue;
+
                 if (t->sysv_start_priority < 0)
                         continue;