FAQ | This is a LIVE service | Changelog

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
......@@ -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
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
......@@ -75,6 +75,6 @@ then
# 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
exit $EXIT
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment