mirror of
https://github.com/zfsonlinux/zfs-auto-snapshot.git
synced 2024-11-25 09:33:15 +01:00
Fix pool exclusions.
Use $ZPOOL_STATUS instead of $ZFS_STATUS for pool exclusions. A mistaken variable name made the pool exclusion logic a no-op and broke the --skip-scrub switch. Also correct a trivial comment typo.
This commit is contained in:
parent
d77af5a902
commit
cc9f1802ed
@ -358,13 +358,13 @@ do
|
||||
done
|
||||
|
||||
# Get a list of pools that are being scrubbed.
|
||||
ZPOOLS_SCRUBBING=$(echo "$ZFS_STATUS" | awk -F ': ' \
|
||||
ZPOOLS_SCRUBBING=$(echo "$ZPOOL_STATUS" | awk -F ': ' \
|
||||
'$1 ~ /^ *pool$/ { pool = $2 } ; \
|
||||
$1 ~ /^ *scan$/ && $2 ~ /scrub in progress/ { print pool }' \
|
||||
| sort )
|
||||
|
||||
# Get a list of pools that cannot do a snapshot.
|
||||
ZPOOLS_NOTREADY=$(echo "$ZFS_STATUS" | awk -F ': ' \
|
||||
ZPOOLS_NOTREADY=$(echo "$ZPOOL_STATUS" | awk -F ': ' \
|
||||
'$1 ~ /^ *pool$/ { pool = $2 } ; \
|
||||
$1 ~ /^ *state$/ && $2 !~ /ONLINE|DEGRADED/ { print pool } ' \
|
||||
| sort)
|
||||
@ -446,7 +446,7 @@ do
|
||||
# Ibid regarding iii.
|
||||
jjj="$jj/"
|
||||
|
||||
# The --recusive switch only matters for non-wild arguments.
|
||||
# The --recursive switch only matters for non-wild arguments.
|
||||
if [ -z "$opt_recursive" -a "$1" != '//' ]
|
||||
then
|
||||
# Snapshot this dataset non-recursively.
|
||||
|
Loading…
Reference in New Issue
Block a user