diff options
author | Josh Triplett <josh@joshtriplett.org> | 2014-10-29 05:10:48 -0700 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-11-26 19:11:37 -0500 |
commit | e8461023531de98ac6a49eff9d6ffeff6315249c (patch) | |
tree | 99230bec08ffa8c0c60a1c3c018833793b41140f /src/login | |
parent | 7f0a55d4325f7df91f91b3b818f61f97d78df14a (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')
-rw-r--r-- | src/login/logind.c | 9 | ||||
-rw-r--r-- | src/login/logind.conf | 3 |
2 files changed, 8 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[]) { diff --git a/src/login/logind.conf b/src/login/logind.conf index 4608a2c0e2..6b1943a2d1 100644 --- a/src/login/logind.conf +++ b/src/login/logind.conf @@ -5,6 +5,9 @@ # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # +# You can override the directives in this file by creating files in +# /etc/systemd/logind.conf.d/*.conf. +# # See logind.conf(5) for details [Login] |