Simple-init should disable cloud-init
Cloud-init and simple-init are not meant to play together. Lets disable cloud-init if simple-init is installed. Also guarding cloud-init-datasources against running in an environment where cloud-init is not installed. Change-Id: I5bfa9a3e83d3259db2436404034ad58c780de1c9
This commit is contained in:
parent
d8ff69957e
commit
dc33f6ddd0
@ -14,14 +14,16 @@ if [ -z "$DIB_CLOUD_INIT_DATASOURCES" ] ; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# DatasourceNone doesn't exist in Ubuntu 12.04 (Precise)
|
if [ -d /etc/cloud/cloud.cfg.d ]; then
|
||||||
# which uses cloud-init version 0.6.3
|
# DatasourceNone doesn't exist in Ubuntu 12.04 (Precise)
|
||||||
if [ "$(lsb_release -cs)" = 'precise' ] ; then
|
# which uses cloud-init version 0.6.3
|
||||||
cat > /etc/cloud/cloud.cfg.d/91-dib-cloud-init-datasources.cfg <<EOF
|
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 ]
|
datasource_list: [ $DIB_CLOUD_INIT_DATASOURCES ]
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
cat > /etc/cloud/cloud.cfg.d/91-dib-cloud-init-datasources.cfg <<EOF
|
cat > /etc/cloud/cloud.cfg.d/91-dib-cloud-init-datasources.cfg <<EOF
|
||||||
datasource_list: [ $DIB_CLOUD_INIT_DATASOURCES, None ]
|
datasource_list: [ $DIB_CLOUD_INIT_DATASOURCES, None ]
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
cloud-init-datasources
|
||||||
dib-init-system
|
dib-init-system
|
||||||
install-types
|
install-types
|
||||||
source-repositories
|
source-repositories
|
||||||
|
1
elements/simple-init/environment.d/50-disable-cloud-init
Normal file
1
elements/simple-init/environment.d/50-disable-cloud-init
Normal file
@ -0,0 +1 @@
|
|||||||
|
export DIB_CLOUD_INIT_DATASOURCES="None"
|
Loading…
Reference in New Issue
Block a user