From a5e335de4b26f58c3ec7c7f9b1b90953b381aea4 Mon Sep 17 00:00:00 2001 From: Mihai Prica Date: Tue, 16 Jul 2013 17:37:56 +0300 Subject: python-quantum: Configure postgresql credentials The user and password for postgresql are defined in the identity class and are loaded by the recipes from this class. Signed-off-by: Mihai Prica --- meta-openstack/recipes-devtools/python/python-quantum_2013.1.2.bb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'meta-openstack/recipes-devtools/python/python-quantum_2013.1.2.bb') diff --git a/meta-openstack/recipes-devtools/python/python-quantum_2013.1.2.bb b/meta-openstack/recipes-devtools/python/python-quantum_2013.1.2.bb index 357cbae..8f0fa43 100644 --- a/meta-openstack/recipes-devtools/python/python-quantum_2013.1.2.bb +++ b/meta-openstack/recipes-devtools/python/python-quantum_2013.1.2.bb @@ -34,6 +34,12 @@ do_install_append() { sed -e "s:^# core_plugin.*:core_plugin = quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2:g" \ -i ${WORKDIR}/quantum.conf + for file in ovs_quantum_plugin.ini linuxbridge_conf.ini + do + sed -e "s:%DB_USER%:${DB_USER}:g" -i ${WORKDIR}/${file} + sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${WORKDIR}/${file} + done + install -d ${QUANTUM_CONF_DIR} install -d ${QUANTUM_CONF_DIR}/plugins/openvswitch install -d ${QUANTUM_CONF_DIR}/plugins/linuxbridge @@ -65,7 +71,7 @@ pkg_postinst_${SRCNAME} () { sudo -u postgres initdb -D /etc/postgresql/ /etc/init.d/postgresql start sleep 0.2 - sudo -u postgres psql -c "CREATE ROLE admin WITH SUPERUSER LOGIN PASSWORD 'admin'" + sudo -u postgres psql -c "CREATE ROLE ${DB_USER} WITH SUPERUSER LOGIN PASSWORD '${DB_PASSWORD}'" fi sudo -u postgres createdb quantum -- cgit v1.2.3-54-g00ecf