diff options
author | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-04-27 19:39:25 -0300 |
---|---|---|
committer | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-04-27 19:39:25 -0300 |
commit | a3484d36d471110db6eb07c1bcac535fa312a0a4 (patch) | |
tree | ae5757a526845753f943a04ab06e34d198aba78d /extra/postgresql | |
parent | 45a1b262edf175ecf5dd43e51c8ee72f9d78265b (diff) | |
parent | 8784d3134c1d4b4c02d705259ae2ebd768c778fd (diff) |
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts:
community-testing/addresses/PKGBUILD
community-testing/gcc-avr/PKGBUILD
community-testing/gnumail/PKGBUILD
community-testing/gnustep-back/PKGBUILD
community-testing/gnustep-base/PKGBUILD
community-testing/gnustep-gui/PKGBUILD
community-testing/llvm/PKGBUILD
community-testing/systemd/PKGBUILD
community/llvm/PKGBUILD
community/lua-yajl-git/PKGBUILD
community/mingw32-gcc/PKGBUILD
community/python-scipy/PKGBUILD
community/virtualbox/PKGBUILD
core/bin86/PKGBUILD
core/cloog-ppl/PKGBUILD
core/gcc/PKGBUILD
core/mpfr/PKGBUILD
extra/ilmbase/PKGBUILD
extra/kdeedu/PKGBUILD
extra/kdepim/PKGBUILD
extra/latex2html/PKGBUILD
extra/libmad/PKGBUILD
extra/postgresql/PKGBUILD
multilib-testing/binutils-multilib/PKGBUILD
multilib-testing/gcc-multilib/PKGBUILD
multilib-testing/lib32-glibc/PKGBUILD
multilib/gcc-multilib/PKGBUILD
multilib/gcc-multilib/gcc-go.install
testing/bin86/PKGBUILD
testing/binutils/PKGBUILD
testing/coreutils/PKGBUILD
testing/glibc/PKGBUILD
testing/gnome-control-center/PKGBUILD
testing/less/PKGBUILD
testing/linux-api-headers/PKGBUILD
testing/mdadm/PKGBUILD
testing/mpfr/PKGBUILD
testing/udev/PKGBUILD
Diffstat (limited to 'extra/postgresql')
-rw-r--r-- | extra/postgresql/PKGBUILD | 6 | ||||
-rwxr-xr-x | extra/postgresql/postgresql | 28 | ||||
-rw-r--r-- | extra/postgresql/postgresql.install | 7 |
3 files changed, 23 insertions, 18 deletions
diff --git a/extra/postgresql/PKGBUILD b/extra/postgresql/PKGBUILD index ce0dd60c7..d5db674dc 100644 --- a/extra/postgresql/PKGBUILD +++ b/extra/postgresql/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 120038 2011-04-18 17:35:03Z dan $ +# $Id: PKGBUILD 120393 2011-04-23 18:29:42Z dan $ # Maintainer: Dan McGee <dan@archlinux.org> pkgbase=postgresql pkgname=('postgresql-libs' 'postgresql-docs' 'postgresql') pkgver=9.0.4 -pkgrel=1 +pkgrel=2 arch=('i686' 'x86_64' 'mips64el') url="http://www.postgresql.org" license=('custom:PostgreSQL') @@ -130,7 +130,7 @@ package_postgresql() { } md5sums=('80390514d568a7af5ab61db1cda27e29' - '89ada7c282d9ffb82c6adc89bc2778ad' + 'eacf91f987d230f2dc2d040618ea1817' 'd63a05943cf0a2726aa2070f3033c569' '4d74f4227dc5e12bf95b3490758d86c9' '96f82c38f3f540b53f3e5144900acf17' diff --git a/extra/postgresql/postgresql b/extra/postgresql/postgresql index 3a8bf44f8..0fbe94036 100755 --- a/extra/postgresql/postgresql +++ b/extra/postgresql/postgresql @@ -9,26 +9,26 @@ PGROOT=${PGROOT:-/var/lib/postgres} PG_CTL="/usr/bin/pg_ctl -D $PGROOT/data -l /var/log/postgresql.log -s -w" postgres_init() { - # initialization - if [ ! -d $PGROOT/data ]; then - mkdir -p $PGROOT/data && chown -R postgres:postgres $PGROOT - su - postgres -c "/usr/bin/initdb $INITOPTS -D $PGROOT/data" - fi - if [ ! -e /var/log/postgresql.log ]; then - touch /var/log/postgresql.log - chown postgres /var/log/postgresql.log - fi + # initialization + if [ ! -d $PGROOT/data ]; then + mkdir -p $PGROOT/data && chown -R postgres:postgres $PGROOT + su - postgres -c "/usr/bin/initdb $INITOPTS -D $PGROOT/data" + fi + if [ ! -e /var/log/postgresql.log ]; then + touch /var/log/postgresql.log + chown postgres /var/log/postgresql.log + fi } case "$1" in start) - postgres_init + postgres_init stat_busy "Starting PostgreSQL" su - postgres -c \ "$PG_CTL start" if [ $? -gt 0 ]; then stat_fail - exit 1 + exit 1 else add_daemon postgresql stat_done @@ -51,19 +51,19 @@ case "$1" in "$PG_CTL reload" if [ $? -gt 0 ]; then stat_fail - exit 1 + exit 1 else stat_done fi ;; restart) - postgres_init + postgres_init stat_busy "Restarting PostgreSQL" su - postgres -c \ "$PG_CTL restart -m fast" if [ $? -gt 0 ]; then stat_fail - exit 1 + exit 1 else add_daemon postgresql stat_done diff --git a/extra/postgresql/postgresql.install b/extra/postgresql/postgresql.install index 4a6f9b848..c3fa4fc3e 100644 --- a/extra/postgresql/postgresql.install +++ b/extra/postgresql/postgresql.install @@ -1,11 +1,16 @@ post_install() { getent group postgres >/dev/null || groupadd -g 88 postgres - getent passwd postgres >/dev/null || useradd -c 'PostgreSQL user' -u 88 -g postgres -d '/var/lib/postgres' -s /sbin/nologin postgres + getent passwd postgres >/dev/null || useradd -c 'PostgreSQL user' -u 88 -g postgres -d '/var/lib/postgres' -s /bin/bash postgres passwd -l postgres >/dev/null } post_upgrade() { post_install $1 + # FS#23858, fix postgres user shell issue + postgres_shell=$(getent passwd postgres | cut -d: -f7) + if [ "$postgres_shell" = "/sbin/nologin" ]; then + chsh -s /bin/bash postgres + fi } post_remove() { |