Whamcloud - gitweb
Properly pick module parameters from modules.conf 02/202/4
authorOleg Drokin <green@whamcloud.com>
Thu, 20 Jan 2011 02:55:00 +0000 (21:55 -0500)
committerOleg Drokin <green@whamcloud.com>
Fri, 11 Feb 2011 21:08:27 +0000 (16:08 -0500)
Fix incorrect regexp that assumes "options <module> params" format
instead of proper "options module params".
Also use baseline to extract just the name of the module.
Now depends on GNU grep for -P (perl_ regexps so that '+' glob works.

Issue: LU-46
Change-Id: Id4d939bf2d9a412d1d5f3f2e7fcbf466ce436e28

lustre/tests/test-framework.sh

index 9302d23..7cc95d8 100644 (file)
@@ -294,7 +294,7 @@ load_module() {
         eval set -- \$$optvar
         if [ $# -eq 0 -a -n "$MODPROBECONF" ]; then
             # Nothing in $MODOPTS_<MODULE>; try modprobe.conf
-            set -- $(grep "^options\\s*\<${module}\>" $MODPROBECONF)
+            set -- $(grep -P "^options\\s+${BASE}" $MODPROBECONF)
             # Get rid of "options $module"
             (($# > 0)) && shift 2