chiark / gitweb /
lookup: always also look into /usr/lib for units
[elogind.git] / src / path-lookup.c
index 922e722e17be40b4743c5c306027caf84cb71a7f..e5533c04d9aa8ba9567f83c55bb7bdc0e6c773e1 100644 (file)
@@ -102,7 +102,11 @@ static char** user_dirs(void) {
         if ((e = getenv("XDG_DATA_DIRS")))
                 data_dirs = strv_split(e, ":");
         else
-                data_dirs = strv_new("/usr/local/share", "/usr/share", NULL);
+                data_dirs = strv_new("/usr/local/share",
+                                     "/usr/local/lib",
+                                     "/usr/share",
+                                     "/usr/lib",
+                                     NULL);
 
         if (!data_dirs)
                 goto fail;
@@ -183,13 +187,15 @@ int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as) {
                         if (!(p->unit_path = strv_new(
                                               /* If you modify this you also want to modify
                                                * systemdsystemunitpath= in systemd.pc.in! */
-                                              "/dev/.run/systemd/system",
+                                              "/run/systemd/system",
                                               SYSTEM_CONFIG_UNIT_PATH,
                                               "/etc/systemd/system",
                                               "/usr/local/share/systemd/system",
+                                              "/usr/local/lib/systemd/system",
                                               "/usr/share/systemd/system",
-                                              "/lib/systemd/system",
+                                              "/usr/lib/systemd/system",
                                               SYSTEM_DATA_UNIT_PATH,
+                                              "/lib/systemd/system",
                                               NULL)))
                                 return -ENOMEM;
         }