]> arthur.barton.de Git - backup-script.git/commitdiff
Don't set "pipefail", it changes behaviour!
authorAlexander Barton <alex@barton.de>
Fri, 1 Dec 2017 10:44:28 +0000 (11:44 +0100)
committerAlexander Barton <alex@barton.de>
Fri, 1 Dec 2017 10:44:28 +0000 (11:44 +0100)
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.

bin/backup-audit
bin/backup-script
bin/backup-status

index 0dc2995f5925b5da2166067624090a63c0420603..651d0e303ae56532a45579e4b17d8ac99eb0ec04 100755 (executable)
@@ -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 \
index 395fe9e93d194f3ab60c46502c5c167648edbd4d..a04433cfaa4169fbd5ffabc2c16130344bea37d8 100755 (executable)
@@ -55,7 +55,6 @@ default_tags=""
 
 # Set shell options.
 shopt -s nullglob
-set -o pipefail
 
 Usage() {
        {
index 8486873d28f10a90236e0ce315a91f47f49ff1dd..76e75195577c0ce50ebdb78319f94318c7de4d57 100755 (executable)
@@ -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 \