Don't disable cloud-init if not installed part 2
During scripted snapshot image builds we remove python-setuptools on rhel/centos 6. This uninstalls cloud-init on hpcloud centos6 builds because cloud-init depends on setuptools. We don't actually need cloud-init in hpcloud because they use dhcp and we have hard coded ssh keys so just don't bother setting cloud-init config if the config dir in /etc does not exist. One could argue that we would possibly want cloud-init to regen host keys for us, but centos' sshd service should do that for us if the host keys do not exist. Change-Id: I96621b0ab1574eb8db0f4394877d3c1fc8208576
This commit is contained in:
parent
449d432feb
commit
f4bb992006
@ -165,10 +165,13 @@ exit 0
|
||||
EOF
|
||||
|
||||
# Make all cloud-init data sources match rackspace- only attempt to look
|
||||
# at ConfigDrive, not at metadata service
|
||||
# at ConfigDrive, not at metadata service. This is not needed if there
|
||||
# is no cloud-init
|
||||
if [ -d /etc/cloud/cloud.cfg.d ] ; then
|
||||
sudo dd of=/etc/cloud/cloud.cfg.d/95_real_datasources.cfg <<EOF
|
||||
datasource_list: [ ConfigDrive, None ]
|
||||
EOF
|
||||
fi
|
||||
|
||||
sudo bash -c "echo 'include: /etc/unbound/forwarding.conf' >> /etc/unbound/unbound.conf"
|
||||
if [ -e /etc/init.d/unbound ] ; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user