mirror of
https://github.com/zfsonlinux/zfs-auto-snapshot.git
synced 2025-08-14 23:02:39 +02:00
cosmetic bug which showed filesystem added for regular snapshot as recursive
This commit is contained in:
@ -828,32 +828,30 @@ do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
noauto_parent='0'
|
||||||
for jj in $NOAUTO
|
for jj in $NOAUTO
|
||||||
do
|
do
|
||||||
# Ibid regarding iii.
|
# Ibid regarding iii.
|
||||||
jjj="$jj/"
|
jjj="$jj/"
|
||||||
|
|
||||||
# The --recursive switch only matters for non-wild arguments.
|
if [ "$jjj" = "$iii" ]
|
||||||
if [ -z "$opt_recursive" -a "$1" != '//' ]
|
|
||||||
then
|
|
||||||
# Snapshot this dataset non-recursively.
|
|
||||||
print_log debug "Including $ii for regular snapshot."
|
|
||||||
TARGETS_DREGULAR=( ${TARGETS_DREGULAR[@]} $( printf "%s\n" $ii))
|
|
||||||
continue 2
|
|
||||||
# Check whether the candidate name is excluded
|
|
||||||
elif [ "$jjj" = "$iii" ]
|
|
||||||
then
|
then
|
||||||
continue 2
|
continue 2
|
||||||
# Check whether the candidate name is a prefix of any excluded dataset name.
|
# Check whether the candidate name is a prefix of any excluded dataset name.
|
||||||
elif [ "$jjj" != "${jjj#$iii}" ]
|
elif [ "$jjj" != "${jjj#$iii}" ]
|
||||||
then
|
then
|
||||||
# Snapshot this dataset non-recursively.
|
noauto_parent='1' && break
|
||||||
print_log debug "Including $ii for regular snapshot."
|
|
||||||
TARGETS_DREGULAR=( ${TARGETS_DREGULAR[@]} $( printf "%s\n" $ii))
|
|
||||||
continue 2
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# not scrubbing
|
||||||
|
if [ -z "$opt_recursive" -a "$1" != '//' -o "$noauto_parent" = '1' ]
|
||||||
|
then
|
||||||
|
print_log debug "Including $ii for regular snapshot."
|
||||||
|
TARGETS_DREGULAR=( ${TARGETS_DREGULAR[@]} $( printf "%s\n" $ii))
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
for jj in ${TARGETS_TMP_RECURSIVE[@]}
|
for jj in ${TARGETS_TMP_RECURSIVE[@]}
|
||||||
do
|
do
|
||||||
# Ibid regarding iii.
|
# Ibid regarding iii.
|
||||||
@ -910,7 +908,7 @@ test -n "$opt_dry_run" \
|
|||||||
# expand FS list if replication is not used
|
# expand FS list if replication is not used
|
||||||
if [ "$opt_recursive" = ' ' -o "$1" = "//" ]
|
if [ "$opt_recursive" = ' ' -o "$1" = "//" ]
|
||||||
then
|
then
|
||||||
for ii in ${TARGETS_TMP_RECURSIVE[@]}; do TARGETS_DRECURSIVE=( ${TARGETS_DRECURSIVE[@]} $(printf "%s\n" ${ZFS_LOCAL_LIST[@]} | grep ^$ii) ); done
|
for ii in ${TARGETS_TMP_RECURSIVE[@]}; do TARGETS_DRECURSIVE=( ${TARGETS_DRECURSIVE[@]} $(printf "$ii\n") $(printf "%s\n" ${ZFS_LOCAL_LIST[@]} | grep ^"$ii/") ); done
|
||||||
else
|
else
|
||||||
TARGETS_DRECURSIVE=( ${TARGETS_TMP_RECURSIVE[@]} )
|
TARGETS_DRECURSIVE=( ${TARGETS_TMP_RECURSIVE[@]} )
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user