diff --git a/lustre/tests/runtests b/lustre/tests/runtests
index 2d702f5561438a25335660781a7e60732407eb5d..31571f3ae0fc907999719f4fdbbdb81ce339b587 100755
--- a/lustre/tests/runtests
+++ b/lustre/tests/runtests
@@ -40,11 +40,7 @@ while [ "$1" ]; do
 	shift
 done
 
-mounted_lustre_filesystems() {
-	awk '($3 ~ "lustre" && $1 ~ ":") { print $2 }' /proc/mounts
-}
-
-MOUNTED="`mounted_lustre_filesystems`"
+MOUNTED=$(mounted_lustre_filesystems | head -1)
 if [ -z "$MOUNTED" ]; then
 	formatall
 	setupall