diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-08-12 15:39:04 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-08-28 18:41:59 -0400 |
commit | 631c93f0b5499dcfc1fb8f95c25125655d4f9163 (patch) | |
tree | 467fd5e1b1573b5d4505d7185f2f38b519f32a76 /meta-openstack | |
parent | 1ca3fe03b5d248ba405b02b22f093083e84aff33 (diff) | |
download | meta-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.bbappend | 35 |
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 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
2 | PRINC := "${@int(PRINC) + 1}" | ||
3 | |||
4 | SRC_URI += "file://postgresql" | ||
5 | |||
6 | inherit useradd update-rc.d identity | ||
7 | |||
8 | do_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 | |||
16 | USERADD_PACKAGES = "${PN}" | ||
17 | GROUPADD_PARAM_${PN} = "--system postgres" | ||
18 | USERADD_PARAM_${PN} = "--system --home /var/lib/postgres -g postgres \ | ||
19 | --no-create-home --shell /bin/false postgres" | ||
20 | |||
21 | pkg_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 | |||
32 | FILES_${PN} += "${localstatedir}/run/${PN}" | ||
33 | |||
34 | INITSCRIPT_NAME = "${PN}" | ||
35 | INITSCRIPT_PARAMS = "defaults" | ||