From: Alexander Barton Date: Fri, 1 Dec 2017 10:44:28 +0000 (+0100) Subject: Don't set "pipefail", it changes behaviour! X-Git-Url: https://arthur.barton.de/gitweb/?p=backup-script.git;a=commitdiff_plain;h=45505be93f5c266f43d34df0d6d2b1e18ababa2b Don't set "pipefail", it changes behaviour! Using "pipefail" is a good idea (fail early), but changes behaviour and leeds to undesired side-effects when commands exit because of the PIPEFAIL signal (exit code 141). References: - https://stackoverflow.com/questions/19120263/why-exit-code-141-with-grep-q - http://www.tldp.org/LDP/lpg/node20.html - http://www.pixelbeat.org/programming/sigpipe_handling.html This partially reverts commit 2177f5af642e. --- diff --git a/bin/backup-audit b/bin/backup-audit index 0dc2995..651d0e3 100755 --- a/bin/backup-audit +++ b/bin/backup-audit @@ -29,7 +29,6 @@ default_target="/var/backups" # Set shell options. shopt -s nullglob -set -o pipefail # Search configuration file (last one is used as default!) for conf in \ diff --git a/bin/backup-script b/bin/backup-script index 395fe9e..a04433c 100755 --- a/bin/backup-script +++ b/bin/backup-script @@ -55,7 +55,6 @@ default_tags="" # Set shell options. shopt -s nullglob -set -o pipefail Usage() { { diff --git a/bin/backup-status b/bin/backup-status index 8486873..76e7519 100755 --- a/bin/backup-status +++ b/bin/backup-status @@ -31,7 +31,6 @@ default_target="/var/backups" # Set shell options. shopt -s nullglob -set -o pipefail # Search configuration file (last one is used as default!) for conf in \