From 614b6af62fbe85c93d83ebbda7862d7c432e7763 Mon Sep 17 00:00:00 2001 From: Clint Byrum Date: Wed, 27 Feb 2013 15:07:12 -0800 Subject: [PATCH] Fix heat-cfntools to work on Fedora Also add redhat-lsb to Fedora images for lsb_release which should prove useful as a way to do distro-specific things. Change-Id: Ie32566349319ca244fa02065bb9f81c36c1b49fb --- elements/fedora/install.d/00-lsb | 3 +++ elements/heat-cfntools/install.d/10-ec2-user | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 elements/fedora/install.d/00-lsb diff --git a/elements/fedora/install.d/00-lsb b/elements/fedora/install.d/00-lsb new file mode 100755 index 00000000..1b90771b --- /dev/null +++ b/elements/fedora/install.d/00-lsb @@ -0,0 +1,3 @@ +#!/bin/bash + +exec install-packages redhat-lsb diff --git a/elements/heat-cfntools/install.d/10-ec2-user b/elements/heat-cfntools/install.d/10-ec2-user index dceb4588..fbbc767c 100755 --- a/elements/heat-cfntools/install.d/10-ec2-user +++ b/elements/heat-cfntools/install.d/10-ec2-user @@ -4,6 +4,12 @@ set -uex +# This is a specific workaround for Ubuntu +distro=$(lsb_release -is || :) +if [ "$distro" != "Ubuntu" ] ; then + exit 0 +fi + # Setup ec2-user as expected by HEAT if ! getent passwd ec2-user ; then useradd -m -G admin ec2-user -s /bin/bash @@ -23,4 +29,5 @@ Pin: release o=LP-PPA-tripleo-demo Pin-Priority: 900 EOF # Should pull from demo PPA if cloud-init exists there. -install-packages cloud-init +# Since this is Ubuntu only, the --force-yes is OK +install-packages --force-yes cloud-init