trap 'exit 3' 15
echo
echo "    NI-488.2M GPIB-SCSI-A Driver for Solaris 2.x"   
echo "    This installer will automatically remove old versions of the"
echo "    driver, ib, from /usr/kernel/drv and /kernel/drv. Also, if "
echo "    module ib is already bound, this installer will execute"
echo "    rem_drv ib . If the handler iscurrently in use, exit all the"
echo "    processes using it before proceeding with this installation."
echo
ans=`ckyorn -Q -d y \
-p "Do you want to continue with the installation? default is y"`
if [ "$ans" = n ]
then
 exit 3
fi
if [ "$ans" = no ]
then
 exit 3
fi
if [ "$ans" = N ]
then
 exit 3
fi
if [ "$ans" = No ]
then
 exit 3
fi
if [ "$ans" = NO ]
then
 exit 3
fi
if [ "$ans" = nO ]
then
 exit 3
fi

#DO NOT replace "ckpath -aoy" with "ckpath -aty"
#"-ty" only creats a file, not a directory.
#I think it is a bug.
NIC_IB_INCLUDE=`ckpath -d $NIC_IB_INCLUDE -aoy \
-p "Where should the include file ugpib.h be installed? Default is $NIC_IB_INCLUDE"`
if [ $? -eq 3 ] 
then 
  exit 3
fi

NIC_IB_UTILS=`ckpath -d $NIC_IB_UTILS -aoy -p "Where should the utilities ibconf, ibic, ibtsta, minibconf be installed? Default is $NIC_IB_UTILS"`
if [ $? -eq 3 ] 
then 
  exit 3
fi

NIC_IB_LIB=`ckpath -d $NIC_IB_LIB -aoy \
-p "Where should libgpib.a and libgpib.so be installed? Default is $NIC_IB_LIB"`
if [ $? -eq 3 ] 
then 
  exit 3
fi

cat >$1 <<!
NIC_IB_INCLUDE=$NIC_IB_INCLUDE
NIC_IB_UTILS=$NIC_IB_UTILS
NIC_IB_LIB=$NIC_IB_LIB
NIC_IB_OTHER=$BASEDIR
!

exit 0
