--- /usr/portage/dev-db/postgresql/files/pg_autovacuum.init-8.0 2006-11-11 14:05:45.000000000 +0000 +++ /etc/init.d/pg_autovacuum 2007-08-22 16:16:52.000000000 +0100 @@ -16,7 +16,7 @@ TOO_LONG=0 while [ "$CONTINUE" -eq 0 ] && [ $TOO_LONG -lt 20 ] do - psql -U $PGUSER -d template1 -c "SELECT 1" 1> /dev/null 2> /dev/null + su ${PGUSER} -- -c 'psql -d template1 -c "SELECT 1"' 1> /dev/null 2> /dev/null if [ "$?" -eq 0 ] then CONTINUE=1 @@ -27,7 +27,7 @@ fi done - start-stop-daemon -o --chuid $PGUSER --start --quiet --exec /usr/bin/pg_autovacuum -- -D ${PGPORT:+-p ${PGPORT}} -v $VACUUM_BASE -V $VACUUM_SCALE -s $SLEEP_BASE -S $SLEEP_SCALE -L $PG_AUTOVACUUM_LOG + start-stop-daemon -o --chuid ${PGUSER} --start --quiet --exec /usr/bin/pg_autovacuum -- -D ${PGPORT:+-p ${PGPORT}} -v ${VACUUM_BASE} -V ${VACUUM_SCALE} -s ${SLEEP_BASE} -S ${SLEEP_SCALE} -L ${PG_AUTOVACUUM_LOG} sleep 1 pidof /usr/bin/pg_autovacuum > /dev/null