done on properly installed (make install, rpm, etc.) lustre so...
When trying to install a modules, test if the module is in-tree and if not,
try to modprobe it.
module=$1
shift
BASE=`basename $module $EXT`
- lsmod | grep ${BASE} > /dev/null || insmod ${LUSTRE}/${module}${EXT} $@
+ lsmod | grep -q ${BASE} || \
+ if [ -f ${LUSTRE}/${module}${EXT} ]; then
+ insmod ${LUSTRE}/${module}${EXT} $@
+ else
+ # must be testing a "make install" or "rpm" installation
+ modprobe $module $@
+ fi
}
load_modules() {