#!/bin/sh # #ident "@(#)preremove 1.2 17 Sep 1998 SMI" # #09/03/1998 gshieh NBHOME=/opt/SUNWlznb/sbin CP=/usr/bin/cp GREP=/usr/bin/grep MV=/usr/bin/mv RM=/usr/bin/rm TMP=/tmp/nb.err KERNDRV=/kernel/drv ERROR1="An error was encountered removing the ${NAME} package. \ The file $TMP contains errors reported by the system." ERROR2="The kernel rebuild failed. However all software dealing with the \ ${NAME} package has been removed." echo "\nStart removal of ${NAME} on `date`" >> $TMPERR # Check to see if the network is up. If so, offer chance to have us shut down # the network and continue the removal or to exit. ps -ef | grep "nbdaemon" > /dev/null 2>&1 if [ $? = 0 ] then echo "Shutting down the NetBIOS network." >> $TMPERR /etc/init.d/netbios stop >> $TMPERR 2>&1 wait fi # # Deinstall Netbios # echo "Driver is being removed..................." /usr/sbin/rem_drv nbx grep -v "name=nbx;" /etc/devlink.tab > /tmp/tmp_dev $MV /tmp/tmp_dev /etc/devlink.tab grep -v "^nbx:" /etc/minor_perm > /tmp/tmp_mperm $MV /tmp/tmp_mperm /etc/minor_perm $RM -f /dev/nb $RM -f /dev/nbdg $RM -f /dev/Xnb $RM -f /dev/Xnbdg $RM -f $KERNDRV/nbx $RM -f $KERNDRV/nbx.conf exit 0