From e8461023531de98ac6a49eff9d6ffeff6315249c Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Wed, 29 Oct 2014 05:10:48 -0700 Subject: 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. --- src/login/logind.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/login/logind.c') diff --git a/src/login/logind.c b/src/login/logind.c index 8f00c4633..69b219d89 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[]) { -- cgit v1.2.3