summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2014-04-22 21:22:25 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-04-23 23:36:03 -0400
commit0ae7fe2223c6aca2e6ab0a71946ef59a2de2472c (patch)
tree8d9e89b79f4c2d4765ef9ebeeed454210686227e /meta-openstack/recipes-devtools/python/python-ceilometer_git.bb
parent21fd86369df53482e53e8440e3d5f520d305736a (diff)
downloadmeta-cloud-services-0ae7fe2223c6aca2e6ab0a71946ef59a2de2472c.tar.gz
cleanup: leave source config files pristine
Editing the files in ${WORKDIR} using sed or similar tools as part of do_install means they can only be edited once. Supplying a modified CONTROLLER_IP in local.conf and building the image again will not result in the CONTROLLER_IP being properly updated since the substitution placeholders will no longer exist. We therefore simply swap the other of things, installing the configuration files first, then editing them to swap the placeholders. This means we can run the do_install again and again and get the results we expect. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-ceilometer_git.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-ceilometer_git.bb26
1 files changed, 13 insertions, 13 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb b/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb
index 7ee4e44..a58d218 100644
--- a/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb
@@ -30,24 +30,24 @@ do_install_append() {
30 TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME} 30 TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME}
31 CEILOMETER_CONF_DIR=${D}${sysconfdir}/${SRCNAME} 31 CEILOMETER_CONF_DIR=${D}${sysconfdir}/${SRCNAME}
32 32
33 sed -e "s:%CEILOMETER_SECRET%:${CEILOMETER_SECRET}:g" -i ${WORKDIR}/ceilometer.conf 33 install -d ${CEILOMETER_CONF_DIR}
34 install -m 600 ${WORKDIR}/ceilometer.conf ${CEILOMETER_CONF_DIR}
35 install -m 600 ${TEMPLATE_CONF_DIR}/*.json ${CEILOMETER_CONF_DIR}
36 install -m 600 ${TEMPLATE_CONF_DIR}/*.yaml ${CEILOMETER_CONF_DIR}
34 37
35 sed -e "s:%DB_USER%:${DB_USER}:g" -i ${WORKDIR}/ceilometer.conf 38 sed -e "s:%CEILOMETER_SECRET%:${CEILOMETER_SECRET}:g" -i ${CEILOMETER_CONF_DIR}/ceilometer.conf
36 sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${WORKDIR}/ceilometer.conf
37 39
38 sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${WORKDIR}/ceilometer.conf 40 sed -e "s:%DB_USER%:${DB_USER}:g" -i ${CEILOMETER_CONF_DIR}/ceilometer.conf
39 sed -e "s:%CONTROLLER_HOST%:${CONTROLLER_HOST}:g" -i ${WORKDIR}/ceilometer.conf 41 sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${CEILOMETER_CONF_DIR}/ceilometer.conf
40 42
41 sed -e "s:%COMPUTE_IP%:${COMPUTE_IP}:g" -i ${WORKDIR}/ceilometer.conf 43 sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${CEILOMETER_CONF_DIR}/ceilometer.conf
42 sed -e "s:%COMPUTE_HOST%:${COMPUTE_HOST}:g" -i ${WORKDIR}/ceilometer.conf 44 sed -e "s:%CONTROLLER_HOST%:${CONTROLLER_HOST}:g" -i ${CEILOMETER_CONF_DIR}/ceilometer.conf
43 45
44 sed -e "s:%ADMIN_PASSWORD%:${ADMIN_PASSWORD}:g" -i ${WORKDIR}/ceilometer.conf 46 sed -e "s:%COMPUTE_IP%:${COMPUTE_IP}:g" -i ${CEILOMETER_CONF_DIR}/ceilometer.conf
45 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" -i ${WORKDIR}/ceilometer.conf 47 sed -e "s:%COMPUTE_HOST%:${COMPUTE_HOST}:g" -i ${CEILOMETER_CONF_DIR}/ceilometer.conf
46 48
47 install -d ${CEILOMETER_CONF_DIR} 49 sed -e "s:%ADMIN_PASSWORD%:${ADMIN_PASSWORD}:g" -i ${CEILOMETER_CONF_DIR}/ceilometer.conf
48 install -m 600 ${WORKDIR}/ceilometer.conf ${CEILOMETER_CONF_DIR} 50 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" -i ${CEILOMETER_CONF_DIR}/ceilometer.conf
49 install -m 600 ${TEMPLATE_CONF_DIR}/*.json ${CEILOMETER_CONF_DIR}
50 install -m 600 ${TEMPLATE_CONF_DIR}/*.yaml ${CEILOMETER_CONF_DIR}
51 51
52 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then 52 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
53 install -d ${D}${sysconfdir}/init.d 53 install -d ${D}${sysconfdir}/init.d