Package: backupninja
Version: 0.9.3-6
Severity: important
Tags: patch

pgsql handler can't backup to the backupdir because the shell variables are not 
expanded
because the command string is enclosed in ' not ". - my patch changes that and 
adds eval
to the command call.


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (800, 'testing'), (700, 'stable'), (500, 'proposed-updates'), 
(70, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12.6-xen
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages backupninja depends on:
ii  bash                      3.1-4          The GNU Bourne Again SHell
ii  dialog                    1.0-20060221-1 Displays user-friendly dialog boxe
ii  mawk                      1.3.3-11       a pattern scanning and text proces

backupninja recommends no packages.

-- no debconf information


--- pgsql.orig  2006-04-08 23:03:53.000000000 +0200
+++ pgsql       2006-04-18 12:39:04.000000000 +0200
@@ -72,13 +72,13 @@
 # if $databases = all, use pg_dumpall
 if [ "$databases" == "all" ]; then
     if [ $usevserver = yes ]; then
-       execstr='$VSERVER $vsname exec su - postgres -c \"$PGSQLDUMPALL > 
$backupdir/${vsname}.sql\"'
+       execstr="$VSERVER $vsname exec su - postgres -c \"$PGSQLDUMPALL > 
$backupdir/${vsname}.sql\""
     else
-       execstr='su - postgres -c \"$PGSQLDUMPALL > 
$backupdir/${localhost}-all.sql\"'
+       execstr="su - postgres -c \"$PGSQLDUMPALL > 
$backupdir/${localhost}-all.sql\""
     fi
     debug "$execstr"
     if [ ! $test ]; then
-       output=`$execstr 2>&1`
+       output=`eval $execstr 2>&1`
        code=$?
        if [ "$code" == "0" ]; then
            debug $output
@@ -94,13 +94,13 @@
     for db in $databases; do
        if [ $usevserver = yes ]
            then
-           execstr='$VSERVER $vsname exec su - postgres -c \"$PGSQLDUMP $db > 
$backupdir/${db}.sql\"'
+           execstr="$VSERVER $vsname exec su - postgres -c \"$PGSQLDUMP $db > 
$backupdir/${db}.sql\""
        else
-           execstr='su - postgres -c \"$PGSQLDUMP $db > $backupdir/${db}.sql\"'
+           execstr="su - postgres -c \"$PGSQLDUMP $db > $backupdir/${db}.sql\""
        fi
        debug "$execstr"
        if [ ! $test ]; then
-           output=`$execstr 2>&1`
+           output=`eval $execstr 2>&1`
            code=$?
            if [ "$code" == "0" ]; then
                debug $output
                                                                                
                                                                                
                                                                                
                                                                                
                


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to