diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh
index 014248c7392bf92833435fafd1d6b17c95a07f64..90c08a4662dad2d84469373ca59461f4b15d30e5 100644
--- a/lustre/tests/test-framework.sh
+++ b/lustre/tests/test-framework.sh
@@ -105,7 +105,7 @@ load_modules() {
     echo Loading modules from $LUSTRE
     load_module ../lnet/libcfs/libcfs
     [ -z "$LNETOPTS" ] && \
-        LNETOPTS=`awk '/options lnet/ { print $3 }' /etc/modprobe.conf`
+        LNETOPTS=$(awk '/^options lnet/ { print $0}' /etc/modprobe.conf | sed 's/^options lnet //g')
     echo "lnet options: '$LNETOPTS'"
     # note that insmod will ignore anything in modprobe.conf
     load_module ../lnet/lnet/lnet $LNETOPTS