diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-11-12 22:15:29 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-11-12 22:15:29 -0500 |
commit | 949e1759342b1e60c100855aaf250165bcb9997e (patch) | |
tree | 5515fda8889d42bedd0f3be16cf3f8ee86663e30 /doc | |
parent | 9c64c5d0e01e48612fe37d3304b1f6eb70181cae (diff) | |
download | vyos-cloud-init-949e1759342b1e60c100855aaf250165bcb9997e.tar.gz vyos-cloud-init-949e1759342b1e60c100855aaf250165bcb9997e.zip |
add 'finalcmd' module for running code after cloud-init-final
This allows the user to easily run stuff even after cloud-init-final
has finished. The initial reason for it is to be able to run
/sbin/poweroff and not have cloud-init complain loudly that it is
being killed.
LP: #1064665
Diffstat (limited to 'doc')
-rw-r--r-- | doc/examples/cloud-config.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/examples/cloud-config.txt b/doc/examples/cloud-config.txt index 12bf2c91..4fc5f351 100644 --- a/doc/examples/cloud-config.txt +++ b/doc/examples/cloud-config.txt @@ -256,6 +256,24 @@ bootcmd: - echo 192.168.1.130 us.archive.ubuntu.com > /etc/hosts - [ cloud-init-per, once, mymkfs, mkfs, /dev/vdb ] +# final commands +# default: none +# This can be used to execute commands after and fully detached from +# a cloud-init stage. The initial purpose of it was to allow 'poweroff' +# detached from cloud-init. If poweroff was run from 'runcmd' or userdata +# then messages may be spewed from cloud-init about logging failing or other +# issues as a result of the system being turned off. +# +# You probably are better off using 'runcmd' for this. +# +# The output of finalcmd will redirected redirected to /dev/null +# If you want output to be seen, take care to do so in your commands +# themselves. See example. +finalcmd: + - sleep 30 + - "echo $(date -R): powering off > /dev/console" + - /sbin/poweroff + # cloud_config_modules: # default: # cloud_config_modules: |