From 842821b1fa6a6a550206162550ae5f529d5eec76 Mon Sep 17 00:00:00 2001
From: "Alan J. Pippin" <ajp@pippins.net>
Date: Sat, 4 Nov 2017 13:51:33 -0600
Subject: [PATCH] Fixed bug in searching for zfs-scrub to avoid export after
 backup

Change-Id: Iab159bb8d4117cb277e83da37433a375fcb9c7a4
---
 zfs-replicate-all | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/zfs-replicate-all b/zfs-replicate-all
index 62a0ce4..44ca551 100755
--- a/zfs-replicate-all
+++ b/zfs-replicate-all
@@ -131,7 +131,7 @@ done
 # Export the local pool if told to do so
 if [[ $import_export_backup_pool == 1 ]]; then
   # Don't export the pool if there is a currently running zfs-scrub operation
-  ps -ef | grep -q "zfs-scrub ${backup_pool}" | grep -v grep
+  ps -ef | grep "zfs-scrub" | grep -q "${backup_pool}" | grep -v grep
   if [ $? != 0 ]; then
     zpool export $backup_pool
     if [ $? != 0 ]; then
-- 
2.34.1