FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 9f8b5dc4 authored by Dr Adam Thorn's avatar Dr Adam Thorn
Browse files

Make zfs-rsync.sh exit in error if PRE script fails

parent 33980780
No related branches found
No related tags found
1 merge request!1Improve pre error handling
......@@ -34,6 +34,13 @@ fi
# Prepare the host if required
if [ ! -z "$PRE" ] ; then
$PRE $HN >>$LOGDIR/${HN}_${TAG}-pre.log 2>&1
PRE_EXIT=$?
if [ $PRE_EXIT -ne 0 ] ; then
echo PRE script $PRE exited with $PRE_EXIT >>$LOGFILE
exit $PRE_EXIT
fi
fi
# Do the backup
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment