shutdown comments

Asked by aburow on 2008-02-06

I would like to use the shutdown comments as a record for maintenance shutdowns/recording purposes.

I cannot locate the comments as entered at the end of the shutdown command anywhere on my system.

Using Ubuntu Gutsy (7.10), Server and Desktop with all current stable releases and patches for Upstart.

Question information

Language:
English Edit question
Status:
Answered
For:
upstart Edit question
Assignee:
No assignee Edit question
Last query:
2008-02-07
Last reply:
2008-02-07

Sorry, I'm afraid I need more information.

What "shutdown comments" are you referring to?

aburow (anthony-gosman-rowe) said : #2

My apologies, I was referring to the message field of the shutdown command.

There is an initial shutdown message, a call to wall(), as well as calls to wall() every x minutes/secs (can't remember) and a wall() should the shutdown be canceled.

In the source code I actually note that the shutdown command does not output to syslog at all, which is probably normal (haven't looked at the source for the old shutdown command), so I guess this makes this more of a feature request.

I was looking to do something like what cisco routers and Windows has whereby you can log a handcrafted or standard set of reasons for the reboot in the logs and have it announced somewhere of prominence to administrators.

On further investigation there appears to be functions in the upstart libraries to do this anyway (the logging that is via nih/logging). It looks like it would call for a syslog message before/after the initial wall(), final wall() and the cancel shutdown wall().

I was looking to do something like:

   shutdown -r now "Kernel upgrade to 2.6.22-14-generic"

and be able to pull this kind of information ("Kernel upgrade to 2.6.22-14-generic") out of the syslog automatically for summary/admin purposes.

I don't think this is something that the old sysvinit shutdown used to do, since the tool in Ubuntu is intended to be compatible at the moment, it fits that this also doesn't.

It's a valid feature request though.

Can you help with this problem?

Provide an answer of your own, or ask aburow for more information if necessary.

To post a message you must log in.