Whamcloud - gitweb
- added LNET self test (landing b_self_test).
[fs/lustre-release.git] / lnet / utils / lnetunload
index d9fd908..8141178 100755 (executable)
@@ -2,12 +2,17 @@
 
 lnds=$(echo k{sock,qsw,gm,{open,i,v,o2,c}ib,ra,ptl,mx}lnd)
 
+do_rmmod() {
+    mod=$1
+    if grep "^$mod" /proc/modules >/dev/null 2>&1; then
+       rmmod $mod
+    fi
+}
+
+do_rmmod lnet_selftest
+
 if lctl network down > /dev/null 2>&1; then
-    for mod in $lnds; do
-       if grep "^$mod" /proc/modules >/dev/null 2>&1; then
-           rmmod $mod
-       fi
-    done
+    for mod in $lnds; do do_rmmod $mod; done
 
     rmmod lnet 
     rmmod libcfs