From dfa0b4c86d69c14a4fc8f3bda225526ead3bcd51 Mon Sep 17 00:00:00 2001 From: "Chong.Lu@windriver.com" Date: Tue, 16 Sep 2014 17:36:35 +0800 Subject: 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 Signed-off-by: Martin Jansa --- meta-oe/recipes-support/postgresql/postgresql.inc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'meta-oe/recipes-support/postgresql/postgresql.inc') 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 -- cgit v1.2.3-54-g00ecf