check for dmapi module before running dmapi tests

Merge of master-melb:xfs-cmds:27774a by kenmcd.

  check for dmapi module before running dmapi tests
This commit is contained in:
Allan Randall
2006-12-19 05:09:57 +00:00
parent 5bc5eeb8df
commit 10433178c2
+4
View File
@@ -13,6 +13,7 @@ DMAPI_QASUITE2_DIR=$here/dmapi/src/suite2/
DMAPI_LS_TO_COPY_PATH=$DMAPI_QASUITE2_DIR/bindir/ls_to_copy
_dmapi_scratch_mount () {
if [ `lsmod | grep -c dmapi` -gt 0 ] ; then
if [ `echo "$MOUNT_OPTIONS" | grep -c dmapi` -gt 0 -o \
`echo "$MOUNT_OPTIONS" | grep -c dmi` -gt 0 ] ; then
#already got dmapi options set
@@ -20,4 +21,7 @@ _dmapi_scratch_mount () {
else
_scratch_mount "-o dmapi,mtpt=$SCRATCH_MNT"
fi
else
_notrun "DMAPI modules not loaded"
fi
}