Fixed bug in searching for zfs-scrub to avoid export after backup
[zfs-ubuntu/.git] / zfs-replicate-all
index 62a0ce4d10f60a78cde674427c974341596c413a..44ca551544d780f61691d99aa065bf7b3734ec49 100755 (executable)
@@ -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