From 556535caaa9f9c87d3bb07e9549e8622ce800366 Mon Sep 17 00:00:00 2001
From: Steve Kowalik <steven@wedontsleep.org>
Date: Thu, 28 Jan 2016 19:24:10 +1100
Subject: [PATCH] Don't use wc -l for the umount check

We don't need the follow the pattern of checking wc -l against
/proc/mounts is 0, we care about any match, so we can just use
grep and it's exit code inside the if.

Change-Id: Idd0d78a613f8b43f169a320527c763d0bff74368
---
 tests/dib_functions_test.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/dib_functions_test.sh b/tests/dib_functions_test.sh
index a1a497367..a44408c41 100755
--- a/tests/dib_functions_test.sh
+++ b/tests/dib_functions_test.sh
@@ -37,7 +37,7 @@ fi
 # umount devices
 unmount_dir $TMP_MOUNT_PATH
 
-if [ $(grep "$TMP_DIR" /proc/mounts | wc -l) -ne 0 ]; then
+if grep -q "$TMP_DIR" /proc/mounts; then
     echo "*** FAILED due to mounts being left behind"
     return 1
 else