Update script for modern zpool status output.

This commit is contained in:
Alexander Motin 2016-02-05 18:17:37 +00:00
parent b0fcd5fba2
commit b1963ead44

View File

@ -78,11 +78,14 @@ case "$daily_scrub_zfs_enable" in
continue
fi
_status="$(zpool status ${pool} | grep scrub:)"
_status="$(zpool status ${pool} | grep scan:)"
case "${_status}" in
*"scrub in progress"*)
echo " scrubbing of pool '${pool}' already in progress, skipping:"
;;
*"resilver in progress"*)
echo " resilvering of pool '${pool}' is in progress, skipping:"
;;
*"none requested"*)
echo " starting first scrub (since reboot) of pool '${pool}':"
zpool scrub ${pool}