From 558388f10a0fd7b392d8ab5761ccfddf79485ede Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 7 Nov 2012 09:12:09 +0000 Subject: main/postgresql: fix init scripts for 9.2 - change some variables, {NICE,RUDE,FORCE}_TIMEOUT to correspond with gentoo variables, while still beeing backawards compatible - change data dir to 9.2 - patch initdb to not suggest how to start postgresql --- main/postgresql/pg-restore.initd | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'main/postgresql/pg-restore.initd') diff --git a/main/postgresql/pg-restore.initd b/main/postgresql/pg-restore.initd index 1cc4da5c8..f6075bca2 100644 --- a/main/postgresql/pg-restore.initd +++ b/main/postgresql/pg-restore.initd @@ -1,8 +1,6 @@ #!/sbin/runscript -. /etc/conf.d/postgresql - -opts="${opts} dump restore purge" +extra_commands="${opts} dump restore purge" depend() { need postgresql @@ -12,11 +10,10 @@ restore() { yesno "$PGDUMP" && return 0 ebegin "Restoring PostgreSQL $PGDUMP" psql -U ${PG_USER:-postgres} ${PSQL_OPTS} -f "$PGDUMP" >/dev/null 2>/dev/null + local res=$? yesno "$KEEP_DUMP" || rm -f "$PGDUMP" - - su -l ${PGUSER} \ - -c "env PGDATA=\"${PGDATA}\" /usr/bin/pg_ctl reload " >/dev/null eend $res + /etc/init.d/postgresql reload } dump() { -- cgit v1.2.3