2012-11-13 02:34:29 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Tweak the stock ubuntu cloud-init config
|
|
|
|
|
2014-09-04 04:56:29 +00:00
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
|
|
set -x
|
|
|
|
fi
|
2014-04-03 02:24:15 +00:00
|
|
|
set -eu
|
|
|
|
set -o pipefail
|
2012-11-13 02:34:29 +00:00
|
|
|
|
2015-03-23 20:14:07 +00:00
|
|
|
# cloud-init May not actually be installed
|
|
|
|
mkdir -p /etc/cloud/cloud.cfg.d
|
2015-04-24 11:32:36 +00:00
|
|
|
|
2016-05-23 15:44:32 +00:00
|
|
|
if [ -n "${DIB_CLOUD_INIT_ETC_HOSTS:-}" ]; then
|
2015-04-24 11:32:36 +00:00
|
|
|
dd of=/etc/cloud/cloud.cfg.d/10_etc_hosts.cfg << EOF
|
|
|
|
manage_etc_hosts: $DIB_CLOUD_INIT_ETC_HOSTS
|
2012-11-13 02:34:29 +00:00
|
|
|
EOF
|
2015-04-24 11:32:36 +00:00
|
|
|
fi
|