chiark / gitweb /
Prep v235: Set defaults for the sleep config *after* loading the config file.
authorSven Eden <yamakuzure@gmx.net>
Tue, 29 Aug 2017 14:37:03 +0000 (16:37 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 29 Aug 2017 14:37:03 +0000 (16:37 +0200)
src/login/logind.c

index b66f9a3a509c769e33daf6c3fd18d78e8b4ce5b2..5cc118ae9b2b8acc72f6911927b457f81c37400f 100644 (file)
@@ -81,9 +81,6 @@ static void manager_reset_config(Manager *m) {
 
         m->kill_only_users = strv_free(m->kill_only_users);
         m->kill_exclude_users = strv_free(m->kill_exclude_users);
-#if 1 /// elogind needs an Add-On for sleep configuration
-        elogind_manager_reset_config(m);
-#endif // 1
 }
 
 static Manager *manager_new(void) {
@@ -1140,6 +1137,10 @@ static int manager_dispatch_reload_signal(sd_event_source *s, const struct signa
         else
                 log_info("Config file reloaded.");
 
+#if 1 /// elogind needs an Add-On for sleep configuration
+        elogind_manager_reset_config(m);
+#endif // 1
+
         return 0;
 }
 
@@ -1346,6 +1347,10 @@ int main(int argc, char *argv[]) {
 
         manager_parse_config_file(m);
 
+#if 1 /// elogind needs an Add-On for sleep configuration
+        elogind_manager_reset_config(m);
+#endif // 1
+
         r = manager_startup(m);
         if (r < 0) {
                 log_error_errno(r, "Failed to fully start up daemon: %m");