From: Gregoire Pichon Date: Wed, 16 Jan 2013 13:59:53 +0000 (+0100) Subject: LU-2625 scripts: prevent several errors in lustre_rmmod X-Git-Tag: 2.3.62~50 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=3b527f01db1d8258810eb4a8af8a63fc63bd96b0 LU-2625 scripts: prevent several errors in lustre_rmmod This fix prevents lustre_rmmod scripts from returning errors when lustre modules are partially or not loaded. Signed-off-by: Gregoire Pichon Change-Id: Iefb4166b9b14315319858031f53ecb148c589474 Reviewed-on: http://review.whamcloud.com/5040 Tested-by: Hudson Reviewed-by: Andreas Dilger Reviewed-by: Faccini Bruno Tested-by: Maloo --- diff --git a/lustre/scripts/lustre_rmmod b/lustre/scripts/lustre_rmmod index e07f4c9..a4f81d8 100755 --- a/lustre/scripts/lustre_rmmod +++ b/lustre/scripts/lustre_rmmod @@ -28,9 +28,9 @@ unload_dep_module() { return 0 } -lsmod | grep libcfs > /dev/null && $LCTL dl -lsmod | grep $FSTYPE && unload_dep_module $FSTYPE -unload_dep_module libcfs +lsmod | grep obdclass > /dev/null && $LCTL dl +lsmod | grep $FSTYPE > /dev/null && unload_dep_module $FSTYPE +lsmod | grep libcfs > /dev/null && unload_dep_module libcfs MODULES=$($LCTL modules | awk '{ print $2 }') if [ -n "$MODULES" ]; then