chiark / gitweb /
path-lookup: allow /run to override /etc in generator search
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 9 Jan 2015 04:34:21 +0000 (23:34 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 11 Jan 2015 23:17:33 +0000 (18:17 -0500)
Generators are different than unit files: they are never automatically
generated, so there's no point in allowing /etc to override /run. On
the other hand, overriding /etc might be useful in some cases.

src/shared/path-lookup.c

index 1e5bb85..291a2f4 100644 (file)
@@ -222,14 +222,14 @@ static char** user_dirs(
 
 char **generator_paths(SystemdRunningAs running_as) {
         if (running_as == SYSTEMD_USER)
-                return strv_new("/etc/systemd/user-generators",
-                                "/run/systemd/user-generators",
+                return strv_new("/run/systemd/user-generators",
+                                "/etc/systemd/user-generators",
                                 "/usr/local/lib/systemd/user-generators",
                                 USER_GENERATOR_PATH,
                                 NULL);
         else
-                return strv_new("/etc/systemd/system-generators",
-                                "/run/systemd/system-generators",
+                return strv_new("/run/systemd/system-generators",
+                                "/etc/systemd/system-generators",
                                 "/usr/local/lib/systemd/system-generators",
                                 SYSTEM_GENERATOR_PATH,
                                 NULL);