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
This commit is contained in:
Steve Kowalik 2016-01-28 19:24:10 +11:00
parent 53c57d75c7
commit 556535caaa

View File

@ -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