summaryrefslogtreecommitdiff
path: root/src/login/logind.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-04-22 17:20:42 +0200
committerDaniel Mack <daniel@zonque.org>2015-04-24 17:48:12 +0200
commite2fa5721c3ee5ea400b99a6463e8c1c257e20415 (patch)
tree412e7536125265bd4ab53886ecbaa9e47715380b /src/login/logind.c
parent99f710dde855f7ecb699ddac6ad77923c1f6bc85 (diff)
logind: add code for UTMP wall messages
Add a timer to print UTMP wall messages so that it repeatedly informs users about a scheduled shutdown: * every 1 minute with less than 10 minutes to go * every 15 minutes with less than 60 minutes to go * every 30 minutes with less than 180 minutes (3 hours) to go * every 60 minutes if more than that to go This functionality only active if the .EnableWallMessages DBus property is set to true. Also, a custom string can be added to the wall message, set through the WallMessagePrefix property.
Diffstat (limited to 'src/login/logind.c')
-rw-r--r--src/login/logind.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/login/logind.c b/src/login/logind.c
index 3a4afdd266..0d96bbdaa9 100644
--- a/src/login/logind.c
+++ b/src/login/logind.c
@@ -145,6 +145,7 @@ static void manager_free(Manager *m) {
sd_event_source_unref(m->idle_action_event_source);
sd_event_source_unref(m->inhibit_timeout_source);
sd_event_source_unref(m->scheduled_shutdown_timeout_source);
+ sd_event_source_unref(m->wall_message_timeout_source);
sd_event_source_unref(m->console_active_event_source);
sd_event_source_unref(m->udev_seat_event_source);
@@ -178,6 +179,8 @@ static void manager_free(Manager *m) {
strv_free(m->kill_exclude_users);
free(m->scheduled_shutdown_type);
+ free(m->scheduled_shutdown_tty);
+ free(m->wall_message);
free(m->action_job);
free(m);
}