ldap,mysql,pgsql: use bash pipefail option so that failed dumps are reported as such
[matthijs/upstream/backupninja.git] / handlers / ldap.in
index 853cefb55ce2e0126a00c822b0c7c5cafca5a726..fda24d08878304f044821d08c5608cfde171402f 100644 (file)
@@ -91,7 +91,7 @@ if [ "$ldif" == "yes" ]; then
             execstr="$execstr > $dumpdir/$dbsuffix.ldif"
          fi
          debug "$execstr"
-         output=`su root -c "$execstr" 2>&1`
+         output=`su root -c "set -o pipefail ; $execstr" 2>&1`
          code=$?
          if [ "$code" == "0" ]; then
             debug $output