#!/bin/sh
KERN_VER=$1
#KERN=`uname -r | sed 's/BOOT//'`
DRIVER=sii6512.o
echo " "
echo "This script deletes all sii6512 loadable modules since" 
echo " they were added to the kernel image (no need to load)"  
echo " Note: Some $DRIVER drivers may not exist."
echo " "
 
#echo "Do NOT run cleanup.h if you LOADED the modules. They"
#echo " are needed for non-bootable disk drives since the"
#echo " modules are used for DATA only disk drives"  
#echo " RED HAT ONLY "
#echo "Type carriage return to continue.."
#read nothing

echo "deleting /mnt/sysimage/${KERN_VER}(smp)/kernel/drivers/scsi/$DRIVER"
#chmod 777 /mnt/sysimage/${KERN_VER}/kernel/drivers/scsi/$DRIVER
rm -rf /mnt/sysimage/${KERN_VER}/kernel/drivers/scsi/$DRIVER
rm -rf /mnt/sysimage/${KERN_VER}smp/kernel/drivers/scsi/$DRIVER
rm -rf /mnt/sysimage/${KERN_VER}bigmem/kernel/drivers/scsi/$DRIVER

echo "deleting /lib/modules/${KERN_VER}(smp/bigmem)/kernel/drivers/scsi/$DRIVER"
#chmod 777 /lib/modules/${KERN_VER}/kernel/drivers/scsi/$DRIVER
rm -rf /lib/modules/${KERN_VER}/kernel/drivers/scsi/$DRIVER
rm -rf /lib/modules/${KERN_VER}smp/kernel/drivers/scsi/$DRIVER
rm -rf /lib/modules/${KERN_VER}bigmem/kernel/drivers/scsi/$DRIVER
