summaryrefslogtreecommitdiff
path: root/src/login/logind-core.c
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2018-08-20 19:15:58 +0200
committerSven Eden <yamakuzure@gmx.net>2018-08-24 16:47:08 +0200
commitcf380e653e9ff12805ef32041118fe3c1b9fbd55 (patch)
tree9db95103c4033f921e787b6b26854dedff024ac1 /src/login/logind-core.c
parent0b169925aa9f606dc96fbffc069d76e0ffa45c29 (diff)
Prep v239: Update manager_parse_config_file() that got moved to logind-core.c
Diffstat (limited to 'src/login/logind-core.c')
-rw-r--r--src/login/logind-core.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/login/logind-core.c b/src/login/logind-core.c
index 49c1cbcfb..db0df19e2 100644
--- a/src/login/logind-core.c
+++ b/src/login/logind-core.c
@@ -59,10 +59,22 @@ void manager_reset_config(Manager *m) {
int manager_parse_config_file(Manager *m) {
assert(m);
+#if 0 /// elogind parses its own config file
return config_parse_many_nulstr(PKGSYSCONFDIR "/logind.conf",
- CONF_PATHS_NULSTR("elogind/logind.conf.d"),
+ CONF_PATHS_NULSTR("systemd/logind.conf.d"),
"Login\0",
config_item_perf_lookup, logind_gperf_lookup,
+#else
+ const char* logind_conf = getenv("ELOGIND_CONF_FILE");
+
+ assert(m);
+
+ if (!logind_conf)
+ logind_conf = PKGSYSCONFDIR "/logind.conf";
+
+ return config_parse(NULL, logind_conf, NULL, "Login\0Sleep\0",
+ config_item_perf_lookup, logind_gperf_lookup,
+#endif // 0
CONFIG_PARSE_WARN, m);
}