mirror of
https://github.com/zfsonlinux/zfs-auto-snapshot.git
synced 2025-08-11 05:44:12 +02:00
Abort if pre snapshot hook returns non-zero
This commit is contained in:
@ -159,7 +159,7 @@ do_snapshots () # properties, flags, snapname, oldglob, [targets...]
|
||||
for ii in $TARGETS
|
||||
do
|
||||
do_run "$opt_pre_snapshot $ii $NAME"
|
||||
if do_run "zfs snapshot $PROPS $FLAGS '$ii@$NAME'"
|
||||
if [ $? -eq 0 ] && do_run "zfs snapshot $PROPS $FLAGS '$ii@$NAME'"
|
||||
then
|
||||
do_run "$opt_post_snapshot $ii $NAME"
|
||||
SNAPSHOT_COUNT=$(( $SNAPSHOT_COUNT + 1 ))
|
||||
|
Reference in New Issue
Block a user