Comment 4 for bug 1018554

Revision history for this message
Scott Moser (smoser) wrote :

I chatted a bit with james, and he also said:
<smoser> woudl it be possible to have a single job that fired on halt, poweroff, reboot?
<jodh> that job will fire on halt/poweroff/reboot already.
<jodh> console output prolly makes more sense, yeah, so just drop the redirection.
<smoser> so if it runs on halt/poweroff/reboot, is there a way that i can determine which?
<jodh> yes - the RUNLEVEL variable in that job will be set to 0, 1, or 6. See "man 7 runlevel" for details
<jodh> bear in mind that the job needs to be quick as if things take too long on shutdown, they get killed of course.

So, i suggest we just add this to cloud-init ubuntu packaging.