#!/usr/bin/sh # "ihcp_remove" # 18 May, 1998 # # This shell script will remove all traces of the ihcp driver # and install a 'clean' kernel # # This script will do the following: # 1. Remove the ihcp archive from /usr/conf/lib # 2. Remove ihcp from /usr/conf/master.d # 3. Remove the ihcp entry from /stand/system # 4. Remove the device special files from /dev # 5. Copy vmunix.back to vmunix - if vmunix.back exists # If not, make a virgin unix echo # if /usr/conf/lib/libihcp.a exists, remove it if [ -a /usr/conf/lib/libihcp.a ] then echo removing /usr/conf/lib/libihcp.a echo rm /usr/conf/lib/libihcp.a fi # if /usr/conf/master.d/ihcp exists, remove it if [ -a /usr/conf/master.d/ihcp ] then echo removing /usr/conf/master.d/ihcp echo rm /usr/conf/master.d/ihcp fi # remove the ihcp entry from /stand/system if it is present grep ihcp /stand/system >./ihcp_temp if [[ -s ./ihcp_temp ]] then echo removing ihcp from /stand/system echo /sbin/chmod 666 /stand/system sed -e '/ihcp/d' /stand/system >./ihcp_temp cp ./ihcp_temp /stand/system /sbin/chmod 444 /stand/system fi if [ -a ./ihcp_temp ] then rm ./ihcp_temp fi # remove any ihcp special files from /dev if [ -a /dev/ihcp* ] then echo removing ihcp files from /dev echo rm /dev/ihcp* fi # if /stand/vmunix.back exists, copy it to /stand/vmunix, # else, make a fresh unix if [[ -s /stand/vmunix.back ]] then echo copying /stand/vmunix.back to /stand/vmunix echo cp /stand/vmunix.back /stand/vmunix else echo making clean unix echo /usr/sbin/mk_kernel cp /stand/build/vmunix_test /stand/vmunix fi echo echo DONE - if no error messages, reboot to install clean kernel echo