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:
parent
53c57d75c7
commit
556535caaa
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue