]> gitweb.fluxo.info Git - backupninja.git/commitdiff
Fix reliance on bash for pipefail. (Closes: #602374)
authorintrigeri <intrigeri@boum.org>
Sun, 7 Nov 2010 12:07:26 +0000 (13:07 +0100)
committerintrigeri <intrigeri@boum.org>
Sun, 7 Nov 2010 12:07:26 +0000 (13:07 +0100)
Thanks to Sergio Talens-Oliag <sto@debian.org> for the bug report and patch.

AUTHORS
ChangeLog
handlers/ldap.in
handlers/mysql.in
handlers/pgsql.in

diff --git a/AUTHORS b/AUTHORS
index 5ca3087c73af2ed1afbc6574f6a388f8d1f9ea00..90fa918563ad54e7966925e80700c52a269852d5 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -37,3 +37,4 @@ Chris Nolan <chris@cenolan.com> -- maildir subdirectory expansion
 Dan Carley -- mysql bugfix
 Jordi Mallach <jordi@debian.org> -- do not error when no jobs are configured
 Jacob Anawalt <jlanawalt@gmail.com> -- pg_dump format option
+Sergio Talens-Oliag <sto@debian.org> -- pipefail fixes
index f7bf58563159fb68b7cec206d094cb67b97ca641..8bcdc6b9e00f2d866d02cbccd14650ffe797e157 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,10 +8,17 @@ version 0.9.9 -- UNRELEASED
           (Closes Roundup bug #598)
         . Remove support for duplicity < 0.4.4. Even etch-backports has
           a newer one.
+       ldap:
+        . Fix reliance on bash for pipefail.
+       mysql:
+        . Fix reliance on bash for pipefail.
+          Thanks to Sergio Talens-Oliag <sto@debian.org> for the patch.
+          (Closes: #602374)
        postgresql:
         . Support various pg_dump formats in addition to pg_dumpall.
           Thanks to Jacob Anawalt <jlanawalt@gmail.com> for the patch.
           (Closes Roundup bug #2534)
+        . Fix reliance on bash for pipefail.
        rdiff:
         . Support reading include/exclude patterns from files using the
           "include @/etc/backup_includes" syntax (Closes Roundup bug
index 83307eedd3992e1f4d056dd9dfe0a90e66d732cc..600f1723e0ad64c48b1448845853c837ae3e272a 100644 (file)
@@ -91,7 +91,7 @@ if [ "$ldif" == "yes" ]; then
             execstr="$execstr > $dumpdir/$dbsuffix.ldif"
          fi
          debug "$execstr"
-         output=`su root -c "set -o pipefail ; $execstr" 2>&1`
+         output=`su root -s /bin/bash -c "set -o pipefail ; $execstr" 2>&1`
          code=$?
          if [ "$code" == "0" ]; then
             debug $output
index 0282046f6387c6c458f07fe7a786e28186017d7f..05ea396530b8a04a1890716d30d3ef9c49789fa9 100644 (file)
@@ -303,7 +303,7 @@ then
       debug "su $user -c \"$execstr\""
       if [ ! $test ]
       then
-         output=`su $user -c "set -o pipefail ; $execstr" 2>&1`
+         output=`su $user -s /bin/bash -c "set -o pipefail ; $execstr" 2>&1`
          code=$?
          if [ "$code" == "0" ]
          then
index f68ec2f9cd96d99c66d5483db9d99f4dfdcf1f1a..ff71ebc73b1811887c97526dcbf4ab0886e61705 100644 (file)
@@ -115,13 +115,13 @@ fi
 if [ "$databases" == "all" ]; then
    if [ $usevserver = yes ]; then
       if [ "$compress" == "yes" ]; then
-         execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"set -o pipefail ; $PGSQLDUMPALL | $GZIP $GZIP_OPTS > '$backupdir/${vsname}.sql.gz'\""
+         execstr="$VSERVER $vsname exec su - $PGSQLUSER -s /bin/bash -c \"set -o pipefail ; $PGSQLDUMPALL | $GZIP $GZIP_OPTS > '$backupdir/${vsname}.sql.gz'\""
       else
          execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"$PGSQLDUMPALL > '$backupdir/${vsname}.sql'\""
       fi
    else
       if [ "$compress" == "yes" ]; then
-         execstr="su - $PGSQLUSER -c \"set -o pipefail ; $PGSQLDUMPALL | $GZIP $GZIP_OPTS > '$backupdir/${localhost}-all.sql.gz'\""
+         execstr="su - $PGSQLUSER -s /bin/bash -c \"set -o pipefail ; $PGSQLDUMPALL | $GZIP $GZIP_OPTS > '$backupdir/${localhost}-all.sql.gz'\""
       else
          execstr="su - $PGSQLUSER -c \"$PGSQLDUMPALL > '$backupdir/${localhost}-all.sql'\""
       fi
@@ -152,9 +152,9 @@ else
          globalscmd="$PGSQLDUMPALL -g > '$backupdir/globals.sql'"
       fi
       if [ $usevserver = yes ]; then
-         execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"$globalscmd\""
+         execstr="$VSERVER $vsname exec su - $PGSQLUSER -s /bin/bash -c \"$globalscmd\""
       else
-         execstr="su - $PGSQLUSER -c \"$globalscmd\""
+         execstr="su - $PGSQLUSER -s /bin/bash -c \"$globalscmd\""
       fi
       debug "$execstr"
       if [ ! $test ]; then
@@ -189,9 +189,9 @@ else
          dumpcmd="$PGSQLDUMP --format=$format ${disablecustomcompress} $db | > '$backupdir/${db}.${dumpext}'"
       fi
       if [ $usevserver = yes ]; then
-         execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"$dumpcmd\""
+         execstr="$VSERVER $vsname exec su - $PGSQLUSER -s /bin/bash -c \"$dumpcmd\""
       else
-         execstr="su - $PGSQLUSER -c \"$dumpcmd\""
+         execstr="su - $PGSQLUSER -s /bin/bash -c \"$dumpcmd\""
       fi
       debug "$execstr"
       if [ ! $test ]; then