Whamcloud - gitweb
testing that landing to head keeps history
authornathan <nathan>
Fri, 9 Feb 2007 20:35:36 +0000 (20:35 +0000)
committernathan <nathan>
Fri, 9 Feb 2007 20:35:36 +0000 (20:35 +0000)
lnet/utils/lnetunload [new file with mode: 0755]

diff --git a/lnet/utils/lnetunload b/lnet/utils/lnetunload
new file mode 100755 (executable)
index 0000000..d9fd908
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+lnds=$(echo k{sock,qsw,gm,{open,i,v,o2,c}ib,ra,ptl,mx}lnd)
+
+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
+
+    rmmod lnet 
+    rmmod libcfs
+fi