From e5ec6b4b5dccdbf9de4fe274a3e2d48658140900 Mon Sep 17 00:00:00 2001 From: Jeff Peeler Date: Wed, 7 Nov 2012 15:53:45 -0500 Subject: [PATCH] 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 --- heat/cloudinit/config | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/heat/cloudinit/config b/heat/cloudinit/config index 173ed8cc..9ed9c897 100644 --- a/heat/cloudinit/config +++ b/heat/cloudinit/config @@ -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'} -- 2.45.2