Target ec2-user workaround to Ubuntu 12.10.

Ubuntu 13.04 has been confirmed to work properly, so only Ubuntu 12.10
is affected by the bug (http://pad.lv/1100920). Thus, we can narrow the
scope of the workaround to just "Ubuntu quantal".

Change-Id: Ib42e2bce2f4d0d2cfd6bdeb70cfa4162c2cd6433
This commit is contained in:
Clint Byrum
2013-05-07 09:16:51 -07:00
parent 5671754847
commit ce147f66f4

View File

@@ -4,11 +4,15 @@
set -uex
# This is a specific workaround for Ubuntu
# This is a specific workaround for Ubuntu 12.10 "quantal"
distro=$(lsb_release -is || :)
if [ "$distro" != "Ubuntu" ] ; then
exit 0
fi
codename=$(lsb_release -cs || :)
if [ "$codename" != "quantal" ] ; then
exit 0
fi
# Setup ec2-user as expected by HEAT
if ! getent passwd ec2-user ; then
@@ -23,6 +27,10 @@ fi
# We must pin to this fixed cloud-init from the demo ppa to ensure keys
# are installed. This can be removed if http://pad.lv/1100920 is ever
# fixed in the distro
add-apt-repository -y ppa:tripleo/demo
apt-get update
cat > /etc/apt/preferences.d/cloud-init-from-ppa <<EOF
Package: cloud-init
Pin: release o=LP-PPA-tripleo-demo