FAQ | This is a LIVE service | Changelog

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

Call PRE and POST with same args as zfs-rsync.sh

we were just passing the hostname. Adding extra args should
not impact any existing script, but will let us write better/
more maintainable/deduplicated PRE scripts
parent 7ae60f97
No related branches found
Tags 0.9-ch82
No related merge requests found
......@@ -3,6 +3,6 @@ Priority: optional
Section: otherosfs
Maintainer: Chemistry COs <support@ch.cam.ac.uk>
Architecture: all
Version: 0.9-ch81
Version: 0.9-ch82
Depends: zfs-dkms, postgresql-13 | postgresql-9.5 | postgresql-9.4 , liblockfile-simple-perl, libdbi-perl, libjson-perl, libzfs-perl-chem, libnet-openssh-perl, libdbd-pg-perl, mbuffer, rsync, nfs-kernel-server, pv, libwww-curl-perl
Description: a backup system using ZFS (repository 'backup-scheduler')
......@@ -33,11 +33,11 @@ fi
# Prepare the host if required
if [ ! -z "$PRE" ] ; then
$PRE $HN >>$LOGDIR/${HN}_${TAG}-pre.log 2>&1
$PRE $HN $SRC $DST >>$LOGDIR/${HN}_${TAG}-pre.log 2>&1
PRE_EXIT=$?
if [ $PRE_EXIT -ne 0 ] ; then
echo PRE script $PRE exited with $PRE_EXIT >>$LOGFILE
echo PRE script $PRE $HN $SRC $DST exited with $PRE_EXIT >>$LOGFILE
exit $PRE_EXIT
fi
......@@ -75,6 +75,6 @@ then
fi
# We should always tidy up.
if [ ! -z "$POST" ] ; then
$POST $HN >>$LOGDIR/${HN}_${TAG}-post.log 2>&1
$POST $HN $SRC $DST >>$LOGDIR/${HN}_${TAG}-post.log 2>&1
fi
exit $EXIT
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