From e1abee9ada08fb805c2919ca01ff9e220ad07186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Sun, 30 Oct 2011 16:41:30 +0200 Subject: 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. --- main/postgresql/APKBUILD | 4 ++-- main/postgresql/postgresql.initd | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'main/postgresql') 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 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 $? } -- cgit v1.2.3