aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/postgresql/postgresql.inc
diff options
context:
space:
mode:
authorChong.Lu@windriver.com <Chong.Lu@windriver.com>2014-09-16 17:36:35 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2014-09-26 05:41:53 +0200
commitdfa0b4c86d69c14a4fc8f3bda225526ead3bcd51 (patch)
treee9ad91fc155bbe79ea57c76f152944e97c59295b /meta-oe/recipes-support/postgresql/postgresql.inc
parentcf2ab9ecbfcdac90c331509e9b5e25e51aa73248 (diff)
downloadmeta-openembedded-contrib-dfa0b4c86d69c14a4fc8f3bda225526ead3bcd51.tar.gz
postgresql: move initdb to postgresql-setup
We shouldn't use sysvinit init script to initialize database when use systemd as the init manager, so split initdb function to postgresql-setup. Before starting postgresql server, we can use "postgresql-setup initdb" to initialize the database cluster. Signed-off-by: Chong Lu <Chong.Lu@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/postgresql/postgresql.inc')
-rw-r--r--meta-oe/recipes-support/postgresql/postgresql.inc2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/postgresql/postgresql.inc b/meta-oe/recipes-support/postgresql/postgresql.inc
index a9b4a012ca..774c8fd0c9 100644
--- a/meta-oe/recipes-support/postgresql/postgresql.inc
+++ b/meta-oe/recipes-support/postgresql/postgresql.inc
@@ -29,6 +29,7 @@ SRC_URI = "http://ftp.postgresql.org/pub/source/v${PV}/${BP}.tar.bz2 \
file://postgresql-bashprofile \
file://postgresql.pam \
file://0001-Use-pkg-config-for-libxml2-detection.patch \
+ file://postgresql-setup \
"
LEAD_SONAME = "libpq.so"
@@ -171,6 +172,7 @@ do_install_append() {
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/${BPN}.init ${D}${sysconfdir}/init.d/${BPN}-server
sed -i -e "s/^PGVERSION=.*$/PGVERSION=${PV}/g" ${D}${sysconfdir}/init.d/${BPN}-server
+ install -m 0755 ${WORKDIR}/${BPN}-setup ${D}${bindir}/${BPN}-setup
install -d -m 700 ${D}${localstatedir}/lib/${BPN}/data
install -d -m 700 ${D}${localstatedir}/lib/${BPN}/backups
install -m 644 ${WORKDIR}/${BPN}-bashprofile ${D}${localstatedir}/lib/${BPN}/.bash_profile