summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-keystone_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-keystone_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-keystone_git.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-keystone_git.bb14
1 files changed, 7 insertions, 7 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-keystone_git.bb b/meta-openstack/recipes-devtools/python/python-keystone_git.bb
index 68357a0..da6cfb4 100644
--- a/meta-openstack/recipes-devtools/python/python-keystone_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-keystone_git.bb
@@ -30,13 +30,6 @@ do_install_append() {
30 30
31 install -d ${KEYSTONE_CONF_DIR} 31 install -d ${KEYSTONE_CONF_DIR}
32 32
33 sed -e "s:%SERVICE_TOKEN%:${SERVICE_TOKEN}:g" -i ${WORKDIR}/keystone.conf
34 sed -e "s:%DB_USER%:${DB_USER}:g" -i ${WORKDIR}/keystone.conf
35 sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${WORKDIR}/keystone.conf
36
37 sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${WORKDIR}/keystone.conf
38 sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${WORKDIR}/identity.sh
39
40 install -d ${D}${localstatedir}/log/${SRCNAME} 33 install -d ${D}${localstatedir}/log/${SRCNAME}
41 34
42 install -m 600 ${WORKDIR}/keystone.conf ${KEYSTONE_CONF_DIR}/ 35 install -m 600 ${WORKDIR}/keystone.conf ${KEYSTONE_CONF_DIR}/
@@ -46,6 +39,13 @@ do_install_append() {
46 install -m 600 ${S}/etc/policy.json ${KEYSTONE_CONF_DIR}/policy.json 39 install -m 600 ${S}/etc/policy.json ${KEYSTONE_CONF_DIR}/policy.json
47 install -m 600 ${S}/etc/keystone.conf.sample ${KEYSTONE_CONF_DIR}/keystone.conf.sample 40 install -m 600 ${S}/etc/keystone.conf.sample ${KEYSTONE_CONF_DIR}/keystone.conf.sample
48 41
42 sed -e "s:%SERVICE_TOKEN%:${SERVICE_TOKEN}:g" -i ${KEYSTONE_CONF_DIR}/keystone.conf
43 sed -e "s:%DB_USER%:${DB_USER}:g" -i ${KEYSTONE_CONF_DIR}/keystone.conf
44 sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${KEYSTONE_CONF_DIR}/keystone.conf
45
46 sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${KEYSTONE_CONF_DIR}/keystone.conf
47 sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${KEYSTONE_CONF_DIR}/identity.sh
48
49 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then 49 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
50 install -d ${D}${sysconfdir}/init.d 50 install -d ${D}${sysconfdir}/init.d
51 install -m 0755 ${WORKDIR}/keystone ${D}${sysconfdir}/init.d/keystone 51 install -m 0755 ${WORKDIR}/keystone ${D}${sysconfdir}/init.d/keystone