diff options
author | Timo Teräs <timo.teras@iki.fi> | 2011-10-30 16:41:30 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2011-10-30 16:41:30 +0200 |
commit | e1abee9ada08fb805c2919ca01ff9e220ad07186 (patch) | |
tree | f7848131c264cdc1007c2c0a0766cfbf171b44ea /main/postgresql/postgresql.initd | |
parent | 4817196904e1f54616e525e06c0641cdbd201c98 (diff) | |
download | aports-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/postgresql.initd')
-rw-r--r-- | main/postgresql/postgresql.initd | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/postgresql/postgresql.initd b/main/postgresql/postgresql.initd index 2de91d0df6..3452db8566 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 $? } |