Red Hat Bugzilla – Bug 1257243
RFE: Option for poweroff(1)/reboot(1) to describe why a shutdown/reboot takes place
Last modified: 2017-01-24 08:29:54 EST
Description of problem:
Even this might sound very strange, I would like to see an option for
poweroff(1)/reboot(1) to describe why a shutdown/reboot takes place,
similar like the Microsoft Windows shutdown event tracker. When doing
server maintenance on production systems, I treat it as helpful to know
at a later point when scrolling through the logs why a reboot happened.
Upstream link: https://github.com/systemd/systemd/pull/1029/files
I could imagine something like this:
reboot -m "Security update of kernel"
poweroff -m "Replacement of defunct NIC"
So the goal would be to have this message finally logged in systemd's
journal (or /var/log/messages). I don't know if it makes sense to even
introduce predefined groups (which autofill -m), but my personal needs
would be satisfied with above. I indeed could call logger(1) or so, but
it would be nice to have it along with the command that I run anyway.
Version-Release number of selected component (if applicable):
No option for poweroff(1)/reboot(1) to describe why a shutdown/reboot
Option for poweroff(1)/reboot(1) to describe why a shutdown/reboot takes
*** Bug 1022191 has been marked as a duplicate of this bug. ***
Already upstream (see https://github.com/systemd/systemd/commit/9ef15026c0e7e6600372056c43442c99ec53746e + related commits later).
For RHEL-7, the backport would need a lot more additional testing.
This is the set of patches we need to backport (in that order):
I just realized that backporting is not possible, because, in RHEL7, we still use systemd-shutdownd... Unless there's a strong business reason, we will not re-implement the functionality in RHEL7.