projects
/
zfs-ubuntu
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Return non-zero exit code if any command in pipe fails
[zfs-ubuntu/.git]
/
zfs-restore
diff --git
a/zfs-restore
b/zfs-restore
index 4014ff74598a277f04e330f79757364ccf3fda69..d5ca2e6caeb9e079d1562e217fa3199b617f09fc 100755
(executable)
--- a/
zfs-restore
+++ b/
zfs-restore
@@
-16,6
+16,9
@@
dst_pool=$3
dst_fs=$4
dst_hostname=$5
dst_fs=$4
dst_hostname=$5
+# return non-zero exit code if any command in the pipe fails
+set -o pipefail
+
if [[ -z "$SCRIPT_UNDER_TEST" ]]; then
exec >> $logdir/zfs-restore.log 2>&1
fi
if [[ -z "$SCRIPT_UNDER_TEST" ]]; then
exec >> $logdir/zfs-restore.log 2>&1
fi