From 7f407d8154362a6ce3cd2c5452697327021f43ae 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 cd88f0f..864cc2b 100644 --- a/src/zfs-auto-snapshot.sh +++ b/src/zfs-auto-snapshot.sh @@ -182,7 +182,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