chiark / gitweb /
systemd: include /etc/systemd/system/ and /lib/systemd/system/ in search path uncondi...
[elogind.git] / src / path-lookup.c
index 7a5b9b8..0000362 100644 (file)
@@ -96,7 +96,7 @@ static char** session_dirs(void) {
                  * one. */
 
                 mkdir_parents(data_home, 0777);
                  * one. */
 
                 mkdir_parents(data_home, 0777);
-                symlink("../../../.config/systemd/session", data_home);
+                (void) symlink("../../../.config/systemd/session", data_home);
         }
 
         if ((e = getenv("XDG_DATA_DIRS")))
         }
 
         if ((e = getenv("XDG_DATA_DIRS")))
@@ -181,13 +181,17 @@ int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as) {
                                 return -ENOMEM;
                 } else
                         if (!(p->unit_path = strv_new(
                                 return -ENOMEM;
                 } else
                         if (!(p->unit_path = strv_new(
-                                              SYSTEM_CONFIG_UNIT_PATH,  /* /etc/systemd/system/ */
-                                              SYSTEM_DATA_UNIT_PATH,    /* /lib/systemd/system/ */
+                                              SYSTEM_CONFIG_UNIT_PATH,
+                                              "/etc/systemd/system",
+                                              "/usr/local/share/systemd/system",
+                                              "/usr/share/systemd/system",
+                                              "/lib/systemd/system",
+                                              SYSTEM_DATA_UNIT_PATH,
                                               NULL)))
                                 return -ENOMEM;
         }
 
                                               NULL)))
                                 return -ENOMEM;
         }
 
-        if (running_as == MANAGER_INIT) {
+        if (running_as == MANAGER_SYSTEM) {
                 /* /etc/init.d/ compatibility does not matter to users */
 
                 if ((e = getenv("SYSTEMD_SYSVINIT_PATH")))
                 /* /etc/init.d/ compatibility does not matter to users */
 
                 if ((e = getenv("SYSTEMD_SYSVINIT_PATH")))