X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fpath-lookup.c;h=5464cedbbd04657bb2cefd9dc3dc30623d57376d;hp=e1925f1a4d54e4fb5ca328c6bf7e1cbd5170f77a;hb=b070e7f3c9ed680c821bd89d42506695f2438506;hpb=f437d5d203ff9498ac967c8153169fc79ab6b584 diff --git a/src/path-lookup.c b/src/path-lookup.c index e1925f1a4..5464cedbb 100644 --- a/src/path-lookup.c +++ b/src/path-lookup.c @@ -54,9 +54,10 @@ int user_config_home(char **config_home) { static char** user_dirs(void) { const char * const config_unit_paths[] = { - "/run/systemd/user", USER_CONFIG_UNIT_PATH, - "/etc/systemd/user" + "/etc/systemd/user", + "/run/systemd/user", + NULL }; const char * const data_unit_paths[] = { @@ -64,7 +65,8 @@ static char** user_dirs(void) { "/usr/local/share/systemd/user", USER_DATA_UNIT_PATH, "/usr/lib/systemd/user", - "/usr/share/systemd/user" + "/usr/share/systemd/user", + NULL }; const char *home, *e; @@ -205,9 +207,9 @@ int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as, bool personal /* If you modify this you also want to modify * systemduserunitpath= in systemd.pc.in, and * the arrays in user_dirs() above! */ - "/run/systemd/user", USER_CONFIG_UNIT_PATH, - "/etc/systemd/system", + "/etc/systemd/user", + "/run/systemd/user", "/usr/local/lib/systemd/user", "/usr/local/share/systemd/user", USER_DATA_UNIT_PATH, @@ -222,13 +224,15 @@ int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as, bool personal if (!(p->unit_path = strv_new( /* If you modify this you also want to modify * systemdsystemunitpath= in systemd.pc.in! */ - "/run/systemd/system", SYSTEM_CONFIG_UNIT_PATH, "/etc/systemd/system", + "/run/systemd/system", "/usr/local/lib/systemd/system", - "/usr/lib/systemd/system", SYSTEM_DATA_UNIT_PATH, + "/usr/lib/systemd/system", +#ifdef HAVE_SPLIT_USR "/lib/systemd/system", +#endif NULL))) return -ENOMEM; }