diff --git a/elements/cloud-init-datasources/install.d/05-set-cloud-init-sources b/elements/cloud-init-datasources/install.d/05-set-cloud-init-sources index 4f88ad954..ad4d5b202 100755 --- a/elements/cloud-init-datasources/install.d/05-set-cloud-init-sources +++ b/elements/cloud-init-datasources/install.d/05-set-cloud-init-sources @@ -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