summaryrefslogtreecommitdiffstats
path: root/meta-openstack
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2013-08-12 15:39:04 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-08-28 18:41:59 -0400
commit631c93f0b5499dcfc1fb8f95c25125655d4f9163 (patch)
tree467fd5e1b1573b5d4505d7185f2f38b519f32a76 /meta-openstack
parent1ca3fe03b5d248ba405b02b22f093083e84aff33 (diff)
downloadmeta-cloud-services-631c93f0b5499dcfc1fb8f95c25125655d4f9163.tar.gz
postgresql: add 9.2.4 bbappend
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack')
-rw-r--r--meta-openstack/recipes-support/postgresql/postgresql_9.2.4.bbappend35
1 files changed, 35 insertions, 0 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
new file mode 100644
index 0000000..98e7207
--- /dev/null
+++ b/meta-openstack/recipes-support/postgresql/postgresql_9.2.4.bbappend
@@ -0,0 +1,35 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2PRINC := "${@int(PRINC) + 1}"
3
4SRC_URI += "file://postgresql"
5
6inherit useradd update-rc.d identity
7
8do_install_append() {
9 install -d ${D}${sysconfdir}/${PN}
10 chown postgres ${D}${sysconfdir}/${PN}
11
12 install -d ${D}${sysconfdir}/init.d/
13 install -m 0755 ${WORKDIR}/postgresql ${D}${sysconfdir}/init.d/postgresql
14}
15
16USERADD_PACKAGES = "${PN}"
17GROUPADD_PARAM_${PN} = "--system postgres"
18USERADD_PARAM_${PN} = "--system --home /var/lib/postgres -g postgres \
19 --no-create-home --shell /bin/false postgres"
20
21pkg_postinst_${PN} () {
22 if [ "x$D" != "x" ]; then
23 exit 1
24 fi
25
26 sudo -u postgres initdb -D /etc/${PN}/
27 /etc/init.d/postgresql start
28 sudo -u postgres psql -c "CREATE ROLE ${DB_USER} WITH SUPERUSER LOGIN PASSWORD '${DB_PASSWORD}'"
29 ln -s /usr/share/zoneinfo /usr/share/postgresql/timezone
30}
31
32FILES_${PN} += "${localstatedir}/run/${PN}"
33
34INITSCRIPT_NAME = "${PN}"
35INITSCRIPT_PARAMS = "defaults"