: # # Copyright (C) Advanced Micro Devices, 1993. # Copyright (C) The Santa Cruz Operation, 1988. # # # Prompt for yes or no answer with message passed as argument - # returns non-zero for no getyn() { while echo "\n$* (y/n/q) \c">&2 do read yn rest case $yn in [yY]) return 0 ;; [nN]|[qQ]) return 1 ;; *) echo "Please answer y,n or q" >&2 ;; esac done } # main main main # ============== # Remove temp files and exit with the status passed as argument if [ -z "$*" ] then args="ALL" else args="$*" fi if [ "$args" = "ALL" -o "$args" = "all" ] then args="pnt" fi DRIVERS="" for i in $args do case $i in "PNT"|"pnt") DRIVERS=${DRIVERS}" pnt3 pnt2 pnt1 pnt0";; *) echo "pnt.rmv: Unknown package to remove <<$i>>";; esac done if [ -z "$DRIVERS" ] then exit 0 fi link="N" for i in $DRIVERS do drv=`echo $i | sed -e 's/[0-9]*$//` # # Attempt to use 'netconfig' to remove the product. # if [ -f /usr/lib/netconfig/chains -a -x /etc/netconfig ] then for j in `/etc/netconfig -s | grep "#${i}"` do /etc/netconfig -dnr $j link="Y" done fi # # If any chains under mkdev then call the netconfig remove script # [ -s /usr/lib/lli/chains ] && { for j in `grep $i /usr/lib/lli/chains` do base=`echo $j | sed -e 's/:.*//'` name_above=`echo $j | sed -e 's/.*://'` /usr/lib/netconfig/remove/$base - - $name_above lli y done } # # If the driver is still in the link kit, crowbar it out # /etc/conf/bin/idcheck -p $i if [ $? -gt 16 ] then /etc/conf/bin/idinstall -d -e $i fi # # Remove some files that are still going to be kicking about # rm -f /usr/lib/mkdev/$drv cd /usr/lib/netconfig rm -f info/$i init/${i}* remove/$i reconf/$i cd /usr/lib/lli rm -f init/$i remove/$i reconf/$i done if [ "$link" = "Y" ] then if getyn "Do you wish to relink the kernel" then cd /etc/conf/cf.d; ./link_unix fi fi