Whamcloud - gitweb
LU-8411 ofd: handle last_rcvd file can't update properly
[fs/lustre-release.git] / lustre / scripts / lustre_rmmod
index 6fb3366..76a9d11 100755 (executable)
@@ -11,11 +11,6 @@ LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
 LCTL=${LCTL:-"$LUSTRE/utils/lctl"}
 [ ! -f "$LCTL" ] && export LCTL=$(which lctl 2> /dev/null)
 
-RMMOD=rmmod
-if [ `uname -r | cut -c 3` -eq 4 ]; then
-    RMMOD="modprobe -r"
-fi
-
 unload_dep_module() {
     # libcfs                107852  17 lustre,obdfilter,ost,...
     local MODULE=$1
@@ -24,7 +19,7 @@ unload_dep_module() {
         unload_dep_module $SUBMOD
     done
     [ "$MODULE" = "libcfs" ] && $LCTL dk $TMP/debug >/dev/null || true
-    $RMMOD $MODULE 2>/dev/null || true
+    rmmod $MODULE 2>/dev/null || true
     return 0
 }