home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / rpc / install / preremove < prev   
Text File  |  1998-08-19  |  1KB  |  74 lines

  1. #ident    "@(#)preremove    1.3"
  2. #ident    "$Header: $"
  3.  
  4. PKGMSG=${PKGINST}.pkg
  5. LOCALE=${LC_ALL:-${LC_MESSAGES:-${LANG:-"C"}}}
  6.  
  7. if [ ! -f /usr/lib/locale/${LOCALE}/LC_MESSAGES/${PKGMSG} ]
  8. then
  9.    if [ -f ${REQDIR}/inst/locale/${LOCALE}/${PKGMSG} -a \
  10.     -d /usr/lib/locale/${LOCALE}/LC_MESSAGES ]
  11.    then
  12.     cp ${REQDIR}/inst/locale/${LOCALE}/${PKGMSG} \
  13.        /usr/lib/locale/${LOCALE}/LC_MESSAGES
  14.    fi
  15. fi
  16. #-----Remove administrative files
  17.  
  18. rm -f /etc/publickey || exit 1
  19. rm -f /etc/netid || exit 1
  20.  
  21. #-----Remove drivers
  22. FAILURE=1    # fatal error
  23.  
  24. REBUILD=0
  25.  
  26. CONFDIR=/etc/conf
  27. CONFBIN=${CONFDIR}/bin
  28.  
  29. NOTOOLS=`pfmt -s error -g ${PKGMSG}:51 " The Installable Driver feature has been removed. The %s cannot be removed." ${NAME} 2>&1`
  30.  
  31. # determine that ID/TP tools are available
  32.  
  33. if
  34.     [ ! -x ${CONFBIN}/idbuild -o ! -x ${CONFBIN}/idinstall \
  35.             -o ! -x ${CONFBIN}/idcheck ]
  36. then
  37.     message ${NOTOOLS}
  38.     exit $FAILURE
  39. fi
  40.  
  41. for MODULE in krpc ktli des
  42. do
  43.     ${CONFBIN}/idcheck -p ${MODULE}
  44.     RES="$?"
  45.     if
  46.         [ "${RES}" -ne "100" -a "${RES}" -ne "0" ]
  47.     then
  48.         ${CONFBIN}/idinstall -P ${PKGINST} -d ${MODULE}
  49.         REBUILD=1
  50.     fi
  51. done
  52.  
  53.  
  54. #adminrole -r rpcbind,rpcinfo,rusers,rpc.rwalld,rpc.rusersd,rpc.sprayd,spray,keyserv,newkey,chkey,domainname,keylogin,keylogout NET
  55.  
  56. if
  57.     [ "${REBUILD}" = "1" ]
  58. then
  59.     # rebuild for changes to take effect
  60.     
  61.     ${CONFBIN}/idbuild
  62.     IDERR=$?
  63.  
  64.     if
  65.         [ "${IDERR}" -ne "0" ]
  66.     then
  67.         exit ${FAILURE}
  68.     else
  69.         exit 10
  70.     fi
  71. else
  72.     exit 0
  73. fi
  74.