verified taht works with:
a.) boot wily system with no user-data at all
b.) sudo tee /etc/cloud/cloud.cfg.d/99_poweroff.cfg <<EOF
#cloud-config
runcmd:
- "echo ------------ exiting fail ------------------; exit 1;"
power_state:
mode: poweroff
EOF
c.) rm -Rf /var/lib/cloud
d.) sudo reboot
e.) system will come back up and not poweroff due to this bug
f.) sudo sed -i -e 's,TimeoutSec=0,TimeoutSec=0\nKillMode=process,' /lib/systemd/system/cloud-final.service
g.) sudo rm -Rf /var/lib/cloud
h.) sudo reboot
verified taht works with: cloud.cfg. d/99_poweroff. cfg <<EOF
a.) boot wily system with no user-data at all
b.) sudo tee /etc/cloud/
#cloud-config
runcmd:
- "echo ------------ exiting fail ------------------; exit 1;"
power_state:
mode: poweroff
EOF
c.) rm -Rf /var/lib/cloud 0,TimeoutSec= 0\nKillMode= process, ' /lib/systemd/ system/ cloud-final. service
d.) sudo reboot
e.) system will come back up and not poweroff due to this bug
f.) sudo sed -i -e 's,TimeoutSec=
g.) sudo rm -Rf /var/lib/cloud
h.) sudo reboot
system will turn itself off after reboot.
system wil boot and poweroff