aboutsummaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-support/postgresql/postgresql_9.2.4.bbappend
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openstack/recipes-support/postgresql/postgresql_9.2.4.bbappend')
-rw-r--r--meta-openstack/recipes-support/postgresql/postgresql_9.2.4.bbappend7
1 files changed, 5 insertions, 2 deletions
diff --git a/meta-openstack/recipes-support/postgresql/postgresql_9.2.4.bbappend b/meta-openstack/recipes-support/postgresql/postgresql_9.2.4.bbappend
index c485e2d0..80bfe1ed 100644
--- a/meta-openstack/recipes-support/postgresql/postgresql_9.2.4.bbappend
+++ b/meta-openstack/recipes-support/postgresql/postgresql_9.2.4.bbappend
@@ -6,9 +6,12 @@ SRC_URI += "file://postgresql \
inherit useradd update-rc.d identity hosts
+# default
+DB_DATADIR ?= "/var/lib/postgres/data"
+
do_install_append() {
- install -d ${D}${sysconfdir}/${PN}
- chown postgres ${D}${sysconfdir}/${PN}
+ sed -e "s:%DB_DATADIR%:${DB_DATADIR}:g" -i ${WORKDIR}/postgresql
+ sed -e "s:%DB_DATADIR%:${DB_DATADIR}:g" -i ${WORKDIR}/postgresql-init
install -d ${D}${sysconfdir}/init.d/
install -m 0755 ${WORKDIR}/postgresql ${D}${sysconfdir}/init.d/postgresql