From: Vladimir Sokolovsky Date: Mon, 8 Dec 2008 11:03:27 +0000 (+0200) Subject: Remove OFED kernel modules from updates directory on uninstall. X-Git-Tag: vofed-1.4~3 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=63cf11fde9745ba857880e6adeff909f6d402920;p=~vlad%2Fofed_scripts.git Remove OFED kernel modules from updates directory on uninstall. Signed-off-by: Vladimir Sokolovsky --- diff --git a/uninstall.sh b/uninstall.sh index e760f12..e737bd0 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -245,6 +245,13 @@ uninstall() STACK_PREFIX=$($RPM -ql libibverbs | grep "libibverbs.so" | head -1 | sed -e 's@/lib.*/libibverbs.so.*@@') fi + if [ -x /etc/infiniband/info ]; then + if [ -z ${STACK_PREFIX} ]; then + STACK_PREFIX=`/etc/infiniband/info | grep -w prefix | cut -d '=' -f 2` + fi + KVERSION=`/etc/infiniband/info | grep -w Kernel | cut -d '=' -f 2` + fi + if [ -n "${packs_to_remove}" ]; then ex "$RPM -e --allmatches $packs_to_remove" fi @@ -264,10 +271,6 @@ uninstall() fi fi - if [ -z ${STACK_PREFIX} ] && [ -x /etc/infiniband/info ]; then - STACK_PREFIX=`/etc/infiniband/info | grep -w prefix | cut -d '=' -f 2` - fi - # Remove /usr/local/ofed* if exist # BUG: https://bugs.openfabrics.org/show_bug.cgi?id=563 if [ -d ${STACK_PREFIX} ]; then @@ -299,6 +302,15 @@ uninstall() ex $RPM -e ${voltaire_rpms} fi + if [ ! -z "${KVERSION}" ]; then + # Remove OFED kernel modules from updates directory + LIB_MOD_DIR=/lib/modules/${KVERSION}/updates + /bin/rm -rf ${LIB_MOD_DIR}/kernel/drivers/infiniband + /bin/rm -rf ${LIB_MOD_DIR}/kernel/drivers/net/mlx4 + /bin/rm -rf ${LIB_MOD_DIR}/kernel/drivers/net/cxgb3 + /bin/rm -rf ${LIB_MOD_DIR}/kernel/net/rds + fi + perl -ni -e "print unless (/mlx4_core/)" /etc/modprobe.conf }