Skip to content

Commit cc9f180

Browse files
committed
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.
1 parent d77af5a commit cc9f180

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/zfs-auto-snapshot.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,13 +358,13 @@ do
358358
done
359359

360360
# Get a list of pools that are being scrubbed.
361-
ZPOOLS_SCRUBBING=$(echo "$ZFS_STATUS" | awk -F ': ' \
361+
ZPOOLS_SCRUBBING=$(echo "$ZPOOL_STATUS" | awk -F ': ' \
362362
'$1 ~ /^ *pool$/ { pool = $2 } ; \
363363
$1 ~ /^ *scan$/ && $2 ~ /scrub in progress/ { print pool }' \
364364
| sort )
365365

366366
# Get a list of pools that cannot do a snapshot.
367-
ZPOOLS_NOTREADY=$(echo "$ZFS_STATUS" | awk -F ': ' \
367+
ZPOOLS_NOTREADY=$(echo "$ZPOOL_STATUS" | awk -F ': ' \
368368
'$1 ~ /^ *pool$/ { pool = $2 } ; \
369369
$1 ~ /^ *state$/ && $2 !~ /ONLINE|DEGRADED/ { print pool } ' \
370370
| sort)
@@ -446,7 +446,7 @@ do
446446
# Ibid regarding iii.
447447
jjj="$jj/"
448448

449-
# The --recusive switch only matters for non-wild arguments.
449+
# The --recursive switch only matters for non-wild arguments.
450450
if [ -z "$opt_recursive" -a "$1" != '//' ]
451451
then
452452
# Snapshot this dataset non-recursively.

0 commit comments

Comments
 (0)