summaryrefslogtreecommitdiff
path: root/src/login/logind.h
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.h
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.h')
-rw-r--r--src/login/logind.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/login/logind.h b/src/login/logind.h
index cd2bdc05d2..1c60b01860 100644
--- a/src/login/logind.h
+++ b/src/login/logind.h
@@ -100,6 +100,12 @@ struct Manager {
char *scheduled_shutdown_type;
usec_t scheduled_shutdown_timeout;
sd_event_source *scheduled_shutdown_timeout_source;
+ uid_t scheduled_shutdown_uid;
+ char *scheduled_shutdown_tty;
+
+ char *wall_message;
+ unsigned enable_wall_messages;
+ sd_event_source *wall_message_timeout_source;
sd_event_source *idle_action_event_source;
usec_t idle_action_usec;
@@ -185,3 +191,6 @@ int config_parse_tmpfs_size(const char *unit, const char *filename, unsigned lin
int manager_get_session_from_creds(Manager *m, sd_bus_message *message, const char *name, sd_bus_error *error, Session **ret);
int manager_get_user_from_creds(Manager *m, sd_bus_message *message, uid_t uid, sd_bus_error *error, User **ret);
int manager_get_seat_from_creds(Manager *m, sd_bus_message *message, const char *name, sd_bus_error *error, Seat **ret);
+
+int manager_setup_wall_message_timer(Manager *m);
+bool logind_wall_tty_filter(const char *tty, void *userdata);