summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2018-03-29 15:29:12 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2018-04-03 23:23:43 -0400
commit7db67a8eced8399d198bfa2cd6b9995f8842ead2 (patch)
tree153bf5725da2f713e6fbc988ef3b0051492e87a5
parentb8c333d8ac7944478b448768465b988d64b34582 (diff)
downloadmeta-cloud-services-7db67a8eced8399d198bfa2cd6b9995f8842ead2.tar.gz
postgresql: update all instances of PGDATA
While investigating a postgresql startup issue I found we were only updating one instance of PGDATA where several exist. We do not use these other instances but they are files installed in the system and should reflect our customized setting for PGDATA. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--meta-openstack/recipes-dbs/postgresql/postgresql_9.%.bbappend11
1 files changed, 10 insertions, 1 deletions
diff --git a/meta-openstack/recipes-dbs/postgresql/postgresql_9.%.bbappend b/meta-openstack/recipes-dbs/postgresql/postgresql_9.%.bbappend
index 5b87960..1b8a952 100644
--- a/meta-openstack/recipes-dbs/postgresql/postgresql_9.%.bbappend
+++ b/meta-openstack/recipes-dbs/postgresql/postgresql_9.%.bbappend
@@ -19,7 +19,6 @@ do_install_append() {
19 install -m 0755 ${WORKDIR}/postgresql-init ${D_DEST_DIR}/postgresql-init 19 install -m 0755 ${WORKDIR}/postgresql-init ${D_DEST_DIR}/postgresql-init
20 20
21 sed -e "s:%DB_DATADIR%:${DB_DATADIR}:g" -i ${D_DEST_DIR}/postgresql-init 21 sed -e "s:%DB_DATADIR%:${DB_DATADIR}:g" -i ${D_DEST_DIR}/postgresql-init
22 sed -e "s:\(PGDATA=\).*$:\1${DB_DATADIR}:g" -i ${D}${systemd_unitdir}/system/postgresql.service
23 22
24 sed -e "s:%DB_USER%:${DB_USER}:g" -i ${D_DEST_DIR}/postgresql-init 23 sed -e "s:%DB_USER%:${DB_USER}:g" -i ${D_DEST_DIR}/postgresql-init
25 sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${D_DEST_DIR}/postgresql-init 24 sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${D_DEST_DIR}/postgresql-init
@@ -34,6 +33,16 @@ do_install_append() {
34 PG_INIT_SERVICE_FILE=${D}${systemd_unitdir}/system/postgresql-init.service 33 PG_INIT_SERVICE_FILE=${D}${systemd_unitdir}/system/postgresql-init.service
35 install -m 644 ${WORKDIR}/postgresql-init.service ${PG_INIT_SERVICE_FILE} 34 install -m 644 ${WORKDIR}/postgresql-init.service ${PG_INIT_SERVICE_FILE}
36 sed -e "s:%SYSCONFIGDIR%:${sysconfdir}:g" -i ${PG_INIT_SERVICE_FILE} 35 sed -e "s:%SYSCONFIGDIR%:${sysconfdir}:g" -i ${PG_INIT_SERVICE_FILE}
36
37 # Update PGDATA throughout
38 files="${D}${localstatedir}/lib/${BPN}/.bash_profile"
39 files="$files ${D}${systemd_unitdir}/system/postgresql.service"
40 files="$files ${D}${bindir}/${BPN}-setup"
41 files="$files ${D}${sysconfdir}/init.d/${BPN}-server"
42 for f in $files
43 do
44 sed -e "s:\(PGDATA=\).*$:\1${DB_DATADIR}:g" -i $f
45 done
37} 46}
38 47
39PACKAGES += " ${PN}-setup" 48PACKAGES += " ${PN}-setup"