Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / tests / llmountcleanup.sh
index 81a5832..076faa7 100755 (executable)
@@ -1,45 +1,10 @@
-#!/bin/sh
-LOOP0=/dev/loop0
-LOOP1=/dev/loop1
+#!/bin/bash
+export PATH=`dirname $0`/../utils:$PATH
+NAME=${NAME:-local}
 
-if [ ! -e $LOOP0 ]; then
-    echo $LOOP0 'doesnt exist: (not) using devfs?' 
-    exit
-fi
+LUSTRE=${LUSTRE:-`dirname $0`/..}
+. $LUSTRE/tests/test-framework.sh
+init_test_env $@
+. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 
-umount /mnt/obd
-
-rmmod llight
-rmmod mdc
-/usr/src/obd/utils/obdctl <<EOF
-device 3
-cleanup
-detach
-device 2
-cleanup
-detach
-device 1
-cleanup
-detach
-device 0
-cleanup
-detach
-quit
-EOF
-rmmod mds
-rmmod osc
-rmmod ost
-rmmod obdext2
-rmmod obdclass
-rmmod ptlrpc
-/usr/src/portals/linux/utils/ptlctl <<EOF
-setup tcp localhost 1234
-disconnect self
-disconnect mds
-EOF
-rmmod ksocknal
-killall acceptor
-rmmod portals
-
-losetup -d $LOOP0
-losetup -d $LOOP1
\ No newline at end of file
+cleanupall -f