Change-Id: I7476a6f0f2f010b5a24bbcdfd07e19418eb6688b
# Check for any scrub errors
zpool status $i | grep scan:
# Check for any scrub errors
zpool status $i | grep scan:
- zpool status $i | grep scan: | grep "with 0 errors" > /dev/null 2>&1
+ zpool status $i | grep scan: | grep -e "with 0 errors" -e "in progress" > /dev/null 2>&1
if [ $? != 0 ]; then
# The scrub found errors
zpool status $i | $mailx -s "zpool scrub on $hostname $i found errors" "$mailto"
if [ $? != 0 ]; then
# The scrub found errors
zpool status $i | $mailx -s "zpool scrub on $hostname $i found errors" "$mailto"