From 05356cbc09dba2d8b39f22080d997b889742e546 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Mon, 23 Mar 2015 16:14:07 -0400 Subject: [PATCH] Handle non-cloud-init installs Not all operating-system elements install cloud-init, but the base element assumes its existence. Create the directory if it does not exist. Change-Id: I4bda8dc5d200825ea0c8163a4e5c44050a45083f --- elements/base/install.d/10-cloud-init | 2 ++ 1 file changed, 2 insertions(+) diff --git a/elements/base/install.d/10-cloud-init b/elements/base/install.d/10-cloud-init index c931d0b2b..d696c1c79 100755 --- a/elements/base/install.d/10-cloud-init +++ b/elements/base/install.d/10-cloud-init @@ -7,6 +7,8 @@ fi set -eu set -o pipefail +# cloud-init May not actually be installed +mkdir -p /etc/cloud/cloud.cfg.d dd of=/etc/cloud/cloud.cfg.d/10_etc_hosts.cfg << EOF manage_etc_hosts: localhost EOF