Fix cloud-init runcmd to be exec friendly

Can't use colon builtin apparently, or you'll get this:
/var/lib/cloud/instance/scripts/runcmd: line 2:
 {setenforce 0 > /dev/null 2>&1 ||:: No such file or directory

Added cloud-init debug output to get the above, copied from:
http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/doc/examples/cloud-config-chef.txt

Change-Id: I341cf73bc9a0f843d7ab8c99a9d15e1d514654e7
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
changes/86/15586/1
Jeff Peeler 10 years ago
parent 0f29c45e4f
commit e5ec6b4b5d

@ -1,5 +1,5 @@
runcmd:
- setenforce 0 > /dev/null 2>&1 || :
- setenforce 0 > /dev/null 2>&1 || true
user: ec2-user
@ -11,3 +11,7 @@ cloud_config_modules:
- update_etc_hosts
- update_hostname
- runcmd
# Capture all subprocess output into a logfile
# Useful for troubleshooting cloud-init issues
output: {all: '| tee -a /var/log/cloud-init-output.log'}

Loading…
Cancel
Save