From e3c3700c28b21ff615760c6b6d91697241106ac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Ko=C5=82ecki?= Date: Sat, 20 Nov 2021 17:42:26 +0100 Subject: [PATCH] Fix #81 - further snapshots were aborted after the pre-snapshot command failed once --- src/zfs-auto-snapshot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zfs-auto-snapshot.sh b/src/zfs-auto-snapshot.sh index 5e8154e..904819f 100644 --- a/src/zfs-auto-snapshot.sh +++ b/src/zfs-auto-snapshot.sh @@ -197,7 +197,7 @@ do_snapshots () # properties, flags, snapname, oldglob, [targets...] then if [ "$opt_pre_snapshot" != "" ] then - do_run "$opt_pre_snapshot $ii $NAME" || RUNSNAP=0 + do_run "$opt_pre_snapshot $ii $NAME" && RUNSNAP=1 || RUNSNAP=0 fi if [ $RUNSNAP -eq 1 ] && do_run "zfs snapshot $PROPS $FLAGS '$ii@$NAME'" then