forked from extern/zfs-auto-snapshot
Abort if pre snapshot hook returns non-zero
This commit is contained in:
parent
da5a8bd5b7
commit
c08f366c1c
@ -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 ))
|
||||
|
Loading…
Reference in New Issue
Block a user