From 4f58891850b6285301001bf64cb31659ee87af67 Mon Sep 17 00:00:00 2001
From: "Alan J. Pippin" <alan@pippins.net>
Date: Fri, 2 Oct 2020 12:47:50 -0600
Subject: [PATCH] Don't report still in progress zfs scrubs as errors

Change-Id: I7476a6f0f2f010b5a24bbcdfd07e19418eb6688b
---
 zfs-scrub | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/zfs-scrub b/zfs-scrub
index 50813fc..5388f54 100755
--- a/zfs-scrub
+++ b/zfs-scrub
@@ -96,7 +96,7 @@ do
 
   # 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" 
-- 
2.34.1