1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-01 20:58:21 +03:00

path-lookup: allow /run to override /etc in generator search

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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2015-01-08 23:34:21 -05:00
parent 4f1a33dd0d
commit 33e1e5a756

View File

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