From: intrigeri Date: Mon, 24 Apr 2006 16:16:12 +0000 (+0000) Subject: pgsql: postgres user UID is now the one from inside the vserver if necessary X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=09e5675038067127590fae60f4156e0806381f79;p=matthijs%2Fupstream%2Fbackupninja.git pgsql: postgres user UID is now the one from inside the vserver if necessary git-svn-id: http://code.autistici.org/svn/backupninja/trunk@392 758a04ac-41e6-0310-8a23-8373a73cc35d --- diff --git a/ChangeLog b/ChangeLog index 2a414a3..ae871bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,7 @@ version 0.9.4 -- unreleased . Fixed inversed vsname emptiness check . Fixed su quote usage to be more posixy . Fixed shell expansion, thanks Thomas Kotzian (Closes: #363297) + . postgres user UID is now the one from inside the vserver if necessary svn: . Fixed inversed vsname emptiness check rdiff: diff --git a/handlers/pgsql b/handlers/pgsql index b67b3f1..0c72c82 100644 --- a/handlers/pgsql +++ b/handlers/pgsql @@ -61,7 +61,11 @@ fi # give backup dir the good uid and permissions # (in respect to the vserver, if $usevserver = yes) -pguid=`getent passwd postgres | awk -F: '{print $3}'` +if [ $usevserver = yes ]; then + pguid=`$VSERVER $vsname exec getent passwd postgres | awk -F: '{print $3}'` +else + pguid=`getent passwd postgres | awk -F: '{print $3}'` +fi [ -n "$pguid" ] || \ fatal "No user called postgres`[ $usevserver = no ] || echo \" on vserver $vsname\"`." debug "chown $pguid $vroot$backupdir"