Do not use DatasourceNone for precise cloud-init
The 'None' Datasource does not exist in precise 12.04 (which uses cloud-init 0.6.3), so conditionally ensure that we are not including this in the datasource_list in case we're building a precise image. Partial-bug: 1329068 Change-Id: I6efb91e17bf896bbf7d67c31c4eb5098d5d61a71
This commit is contained in:
parent
6ff1681915
commit
d550087214
@ -11,6 +11,14 @@ if [ -z "$DIB_CLOUD_INIT_DATASOURCES" ] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat > /etc/cloud/cloud.cfg.d/91-dib-cloud-init-datasources.cfg <<EOF
|
||||
# DatasourceNone doesn't exist in Ubuntu 12.04 (Precise)
|
||||
# which uses cloud-init version 0.6.3
|
||||
if [ "$(lsb_release -cs)" = 'precise' ] ; then
|
||||
cat > /etc/cloud/cloud.cfg.d/91-dib-cloud-init-datasources.cfg <<EOF
|
||||
datasource_list: [ $DIB_CLOUD_INIT_DATASOURCES ]
|
||||
EOF
|
||||
else
|
||||
cat > /etc/cloud/cloud.cfg.d/91-dib-cloud-init-datasources.cfg <<EOF
|
||||
datasource_list: [ $DIB_CLOUD_INIT_DATASOURCES, None ]
|
||||
EOF
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user