summaryrefslogtreecommitdiff
path: root/src/login/logind.c
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2014-10-29 05:10:48 -0700
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-11-26 19:11:37 -0500
commite8461023531de98ac6a49eff9d6ffeff6315249c (patch)
tree99230bec08ffa8c0c60a1c3c018833793b41140f /src/login/logind.c
parent7f0a55d4325f7df91f91b3b818f61f97d78df14a (diff)
logind: Support logind.conf.d directories in the usual search paths
This makes it possible to drop in logind configuration snippets from a package or other configuration management mechanism. Add documentation to the header of /etc/logind.conf pointing the user at /etc/logind.conf.d/*.conf. Introduce a new helper, conf_parse_many, to parse configuration files in a search path.
Diffstat (limited to 'src/login/logind.c')
-rw-r--r--src/login/logind.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/login/logind.c b/src/login/logind.c
index 8f00c46339..69b219d89e 100644
--- a/src/login/logind.c
+++ b/src/login/logind.c
@@ -1171,10 +1171,11 @@ int manager_run(Manager *m) {
static int manager_parse_config_file(Manager *m) {
assert(m);
- return config_parse(NULL, "/etc/systemd/logind.conf", NULL,
- "Login\0",
- config_item_perf_lookup, logind_gperf_lookup,
- false, false, true, m);
+ return config_parse_many("/etc/systemd/logind.conf",
+ CONF_DIRS_NULSTR("systemd/logind.conf"),
+ "Login\0",
+ config_item_perf_lookup, logind_gperf_lookup,
+ false, m);
}
int main(int argc, char *argv[]) {