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.
I chatted a bit with james, and he also said: reboot already. reboot, is there a way that i can determine which?
<smoser> woudl it be possible to have a single job that fired on halt, poweroff, reboot?
<jodh> that job will fire on halt/poweroff/
<jodh> console output prolly makes more sense, yeah, so just drop the redirection.
<smoser> so if it runs on halt/poweroff/
<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.