Skip to content

Commit

Permalink
Merge pull request #1 from jigpu/fix-no-recursive
Browse files Browse the repository at this point in the history
Use TARGETS_REGULAR if the recursive flag is not set
  • Loading branch information
daniel-ayers authored Jun 7, 2022
2 parents 6a7d6c3 + bce1d7e commit b2837ba
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/zfs-auto-snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -567,15 +567,24 @@ do
fi
done

# Append this candidate to the recursive snapshot list because it:
# Append this candidate to the snapshot list because it:
#
# * Does not have an exclusionary property.
# * Is in a pool that can currently do snapshots.
# * Does not have an excluded descendent filesystem.
# * Is not the descendant of an already included filesystem.
#
print_log debug "Including $ii for recursive snapshot."
TARGETS_RECURSIVE="${TARGETS_RECURSIVE:+$TARGETS_RECURSIVE }$ii" # nb: \t
if [ -z "$opt_recursive" ]
then
print_log debug "Including $ii for regular snapshot."
TARGETS_REGULAR="${TARGETS_REGULAR:+$TARGETS_REGULAR }$ii" # nb: \t
else
# Append this candidate to the recursive snapshot list because it additionally:
#
# * Does not have an excluded descendent filesystem.
# * Is not the descendant of an already included filesystem.
#
print_log debug "Including $ii for recursive snapshot."
TARGETS_RECURSIVE="${TARGETS_RECURSIVE:+$TARGETS_RECURSIVE }$ii" # nb: \t
fi
done

# Linux lacks SMF and the notion of an FMRI event, but always set this property
Expand Down

0 comments on commit b2837ba

Please sign in to comment.