#
# Copyright (c) 1994 Sun Microsystems
#
# preremove script for SUNWos86r package.
#

# remove drivers

# The following scripts are executed only when BASEDIR is "/".
 
if [ ${BASEDIR} = "/" ]
then
	if [ -f /kernel/drv/xsvc -a -h /dev/xsvc ]
	then
	        rem_drv xsvc
		rm -f /dev/xsvc 
	fi
	
	if [ -f /kernel/drv/p9000 ]
	then
	        rem_drv p9000 > /dev/null 2>&1
	fi
else
 
# The following scripts are executed only when BASEDIR is not "/". This implies
# to install from server for the client and reboot is required.

	if [ -f ${BASEDIR}/kernel/drv/xsvc -a -h ${BASEDIR}/dev/xsvc ]
	then
	        rem_drv -b ${BASEDIR} xsvc
		rm -f ${BASEDIR}/dev/xsvc 
	fi
	
	if [ -f ${BASEDIR}/kernel/drv/p9000 ]
	then
	        rem_drv -b ${BASEDIR} p9000 > /dev/null 2>&1
	fi
fi	
exit 0
