summaryrefslogtreecommitdiffstats
path: root/main/postgresql
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-10-30 16:41:30 +0200
committerTimo Teräs <timo.teras@iki.fi>2011-10-30 16:41:30 +0200
commite1abee9ada08fb805c2919ca01ff9e220ad07186 (patch)
treef7848131c264cdc1007c2c0a0766cfbf171b44ea /main/postgresql
parent4817196904e1f54616e525e06c0641cdbd201c98 (diff)
downloadaports-e1abee9ada08fb805c2919ca01ff9e220ad07186.tar.bz2
aports-e1abee9ada08fb805c2919ca01ff9e220ad07186.tar.xz
main/postgres: fix init.d script pid checking
The pid file contains a lot of numeric stuff. The first line is the PID, so use just 'read' to get it instead of the grep.
Diffstat (limited to 'main/postgresql')
-rw-r--r--main/postgresql/APKBUILD4
-rw-r--r--main/postgresql/postgresql.initd3
2 files changed, 4 insertions, 3 deletions
diff --git a/main/postgresql/APKBUILD b/main/postgresql/APKBUILD
index d5d1c5c25..e0c70cb5a 100644
--- a/main/postgresql/APKBUILD
+++ b/main/postgresql/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=postgresql
pkgver=9.1.1
-pkgrel=0
+pkgrel=1
pkgdesc="A sophisticated object-relational DBMS"
url="http://www.postgresql.org/"
arch="all"
@@ -58,7 +58,7 @@ client() {
md5sums="061a9f17323117c9358ed60f33ecff78 postgresql-9.1.1.tar.bz2
-66c197b8186a6df0752fe2aed40c90c4 postgresql.initd
+7d7b7815f2bf133830f65ed9830ce461 postgresql.initd
c56a4db0c3757f5dc7f9d59132b428ba postgresql.confd
5f6d10a6a3d71dcee856fa6671954ab4 pg-restore.initd
bf45384752b320b369f1425939763178 pg-restore.confd"
diff --git a/main/postgresql/postgresql.initd b/main/postgresql/postgresql.initd
index 2de91d0df..3452db856 100644
--- a/main/postgresql/postgresql.initd
+++ b/main/postgresql/postgresql.initd
@@ -50,7 +50,8 @@ start() {
return 1
fi
- local pid=$(grep "^[0-9]\+" "$PGDATA/postmaster.pid")
+ local pid
+ read pid < "$PGDATA/postmaster.pid"
test -d /proc/"${pid}"
eend $?
}