diff options
author | Michal Sekletar <msekleta@redhat.com> | 2012-07-30 17:25:39 +0200 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2012-08-06 16:25:55 +0200 |
commit | dfcc5c33f42554a5293e68e7093da2403e363997 (patch) | |
tree | d6f004cd8775200a8d329fc28d365e2063d954cd /src/shutdownd/shutdownd.c | |
parent | 9cb48731b29f508178731b45b0643c816800c05e (diff) |
shutdown: allow to specify broadcast message when cancelling shutdown
makes shutdown behaviour more compatible
Diffstat (limited to 'src/shutdownd/shutdownd.c')
-rw-r--r-- | src/shutdownd/shutdownd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shutdownd/shutdownd.c b/src/shutdownd/shutdownd.c index d426d9833d..c0747415fd 100644 --- a/src/shutdownd/shutdownd.c +++ b/src/shutdownd/shutdownd.c @@ -136,6 +136,8 @@ static void warn_wall(usec_t n, struct sd_shutdown_command *c) { prefix = "The system is going down for reboot at "; else if (c->mode == SD_SHUTDOWN_KEXEC) prefix = "The system is going down for kexec reboot at "; + else if (c->mode == SD_SHUTDOWN_NONE) + prefix = "The system shutdown has been cancelled at "; else assert_not_reached("Unknown mode!"); @@ -354,6 +356,8 @@ int main(int argc, char *argv[]) { if (!scheduled(&b.command)) { log_info("Shutdown canceled."); + if (b.command.warn_wall) + warn_wall(0, &b.command); break; } |