Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use TARGETS_REGULAR if the recursive flag is not set #124

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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