[Python-apps-commits] r9898 - in packages/cloud-init/trunk/debian (2 files)
zigo at users.alioth.debian.org
zigo at users.alioth.debian.org
Mon Jul 22 11:48:12 UTC 2013
Date: Monday, July 22, 2013 @ 11:48:10
Author: zigo
Revision: 9898
Reads the currently set value in /etc/cloud/cloud.cfg.d/90_dpkg.cfg to db_set the value of cloud-init/datasources (Closes: #709773).
Modified:
packages/cloud-init/trunk/debian/changelog
packages/cloud-init/trunk/debian/cloud-init.config
Modified: packages/cloud-init/trunk/debian/changelog
===================================================================
--- packages/cloud-init/trunk/debian/changelog 2013-07-22 11:15:41 UTC (rev 9897)
+++ packages/cloud-init/trunk/debian/changelog 2013-07-22 11:48:10 UTC (rev 9898)
@@ -23,6 +23,8 @@
- modules --mode config (cloud-config)
- modules --mode final (cloud-init-final)
- init --local (cloud-init-local)
+ * Reads the currently set value in /etc/cloud/cloud.cfg.d/90_dpkg.cfg to
+ db_set the value of cloud-init/datasources (Closes: #709773).
-- Thomas Goirand <zigo at debian.org> Tue, 09 Jul 2013 23:10:34 +0800
Modified: packages/cloud-init/trunk/debian/cloud-init.config
===================================================================
--- packages/cloud-init/trunk/debian/cloud-init.config 2013-07-22 11:15:41 UTC (rev 9897)
+++ packages/cloud-init/trunk/debian/cloud-init.config 2013-07-22 11:48:10 UTC (rev 9898)
@@ -29,19 +29,24 @@
return 1
}
-if [ ! -f /etc/cloud/distro.cfg ] &&
- [ ! -f /etc/cloud/cloud.cfg.d/90_dpkg.cfg ] &&
- { db_fget cloud-init/datasources seen || : ; } &&
- [ "${RET}" = "false" ]; then
- db_get cloud-init/datasources
- def="${RET}"
- # if this is the first time this we've run, then try
- # to detect if we would have access to DataSourceEc2
- case " ${def}," in
- *\ Ec2,*) :;;
- *) hasEc2Md &&
- db_set cloud-init/datasources "${def:+${def}, }Ec2";;
- esac
+if [ -f /etc/cloud/cloud.cfg.d/90_dpkg.cfg ] && [ -f /etc/cloud/distro.cfg ] ; then
+ DATASRC_LIST=`cat /etc/cloud/cloud.cfg.d/90_dpkg.cfg | grep "datasource_list:" | sed 's/datasource_list: \[ //' | sed 's/ \]//'`
+ if [ -n "${DATASRC_LIST}" ] ; then
+ db_set cloud-init/datasources ${DATASRC_LIST}
+ fi
+else
+ if { db_fget cloud-init/datasources seen || : ; } &&
+ [ "${RET}" = "false" ]; then
+ db_get cloud-init/datasources
+ def="${RET}"
+ # if this is the first time this we've run, then try
+ # to detect if we would have access to DataSourceEc2
+ case " ${def}," in
+ *\ Ec2,*) :;;
+ *) hasEc2Md &&
+ db_set cloud-init/datasources "${def:+${def}, }Ec2";;
+ esac
+ fi
fi
db_input low cloud-init/datasources || true
More information about the Python-apps-commits
mailing list