core: Move environment generator path lookup into path-lookup.c

This commit is contained in:
Benjamin Berg
2020-03-04 11:24:33 +01:00
parent fd74a13e85
commit cccf570355
3 changed files with 21 additions and 20 deletions
+14
View File
@@ -837,3 +837,17 @@ char **generator_binary_paths(UnitFileScope scope) {
assert_not_reached("Hmm, unexpected scope.");
}
}
char **env_generator_binary_paths(bool is_system) {
if (is_system)
return strv_new("/run/systemd/system-environment-generators",
"/etc/systemd/system-environment-generators",
"/usr/local/lib/systemd/system-environment-generators",
SYSTEM_ENV_GENERATOR_PATH);
else
return strv_new("/run/systemd/user-environment-generators",
"/etc/systemd/user-environment-generators",
"/usr/local/lib/systemd/user-environment-generators",
USER_ENV_GENERATOR_PATH);
}
+1
View File
@@ -72,3 +72,4 @@ void lookup_paths_flush_generator(LookupPaths *p);
void lookup_paths_free(LookupPaths *p);
char **generator_binary_paths(UnitFileScope scope);
char **env_generator_binary_paths(bool is_system);