3 KERNEL
=`uname -r | sed 's/-.*//'`
5 VMWARE_VERSION
=`vmware-installer -l | grep vmware | cut -s -d " " -f 2-`
6 VMWARE_VERSION
=${VMWARE_VERSION// }
8 echo "Reverting vmware patches applied for version ${VMWARE_VERSION}"
10 timestamp
=`date +%Y%m%d-%H%M%S`
11 if [ `whoami` != "root" ]
13 echo "This need to be run as root"
17 echo "Reverting vmware modconfig libraries:"
19 /usr/lib/vmware/lib/libvmware-modconfig-console.so/libvmware-modconfig-console.so \
20 /usr/lib/vmware/lib/libvmware-modconfig.so/libvmware-modconfig.so \
23 mv "${mod}".bak
"${mod}"
27 echo "* Failed to revert "`basename ${mod}`" (or nothing to revert)"
29 echo "* "`basename ${mod}`" reverted successfully"
33 echo "Reverting vmware modules source code:"
35 SRC
="/usr/lib/vmware/modules/source/"
36 for mod
in `ls $SRC*.tar-* | sed "s/.*\/\(.*\).tar-.*/\1/" | sort | uniq`
38 echo "* Reverting ${mod} ..."
39 LAST
=`ls $SRC$mod.tar-${VMWARE_VERSION}* | sort | head -n 1`
44 echo " [${mod}-only] Failed to revert (or nothing to revert)"
48 echo " [${mod}-only] Reverted successfully"