#! /bin/sh
#	@(#)preremove	1.5 99/01/29 

PATH="/usr/bin:/usr/sbin:${PATH}"
export PATH

$BASEDIR/SUNWo1kp/bin/svc_devices remove

# check for SunOS version
#    if SunOS >= 5.6 then proceed with executing svc_uninstall_xil1.3
#

PKGOSVER=6

if [ -f $PKG_INSTALL_ROOT/etc/nodename ]; then
        OS=`/bin/pkgparam -f /var/sadm/softinfo/INST_RELEASE VERSION | sed s/VERSION=// | sed 's/^2\.//'`
else
        OS=`uname -r | sed 's/^5\.//'`
fi

if [ $OS -ge $PKGOSVER ]; then
   if [ -f ${BASEDIR}/opt/SUNWo1kp/bin/svc_uninstall_xil1.3 ]; then
      ${BASEDIR}/opt/SUNWo1kp/bin/svc_uninstall_xil1.3
   else
   exit 0
   fi
fi

exit 0
