chiark / gitweb /
Prep v231.2: Fix missing/double wall msgs on scheduled shutdown/reboot
authorSven Eden <yamakuzure@gmx.net>
Wed, 21 Jun 2017 08:57:17 +0000 (10:57 +0200)
committerSven Eden <yamakuzure@gmx.net>
Wed, 21 Jun 2017 08:57:17 +0000 (10:57 +0200)
commite344997f56cfe3f2cd9682b9b0c70b5b36050623
tree2b481d82a4f675aa6327e803ed94bcd7c4aa1c57
parent3c4a90354897c8d4b62d55bb50e429b9bb77e8ba
Prep v231.2: Fix missing/double wall msgs on scheduled shutdown/reboot

- Do not do anything in manager_setup_wall_message_timer() if wall
  messages are disabled anyway.
- Set up a wall timer in any case there is time left. The original
  sources would not even set up a timer if the next messages would
  be now. As time is measured in USEC, that's pretty rare, but
  possible.
- If less than 1 Second is left to the first message, delay it.
- systemd would print out a message at once, if less than 15 minutes
  are left to the event. Do this only, if the next scheduled message
  wouldn't come within the next 3 seconds, or it might come to
  awkward double messages.
src/login/logind-utmp.c