Fixed bug in searching for zfs-scrub to avoid export after backup
authorAlan J. Pippin <ajp@pippins.net>
Sat, 4 Nov 2017 19:51:33 +0000 (13:51 -0600)
committerAlan J. Pippin <ajp@pippins.net>
Sat, 4 Nov 2017 19:51:33 +0000 (13:51 -0600)
Change-Id: Iab159bb8d4117cb277e83da37433a375fcb9c7a4

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