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

  1. #!/bin/sh
  2. #
  3. #       @(#) preremove.shinc 12.3 97/11/17 
  4. #
  5. # Copyright (c) 1997 The Santa Cruz Operation, Inc.. All Rights Reserved.
  6. # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE SANTA CRUZ OPERATION INC.
  7. # The copyright notice above does not evidence any actual or intended
  8. # publication of such source code.
  9. #
  10. ME="`basename $0`"
  11. ISL_FILE="/etc/inst/scripts/postreboot.sh"
  12. SUCCESS=0; FAIL=1; INTR=3
  13. trap "exit $INTR" 2 3 15
  14.  
  15. # location of the packaging information files during this phase of installation
  16. INSTALL_DIR="/var/sadm/pkg/$PKGINST/install/$PKGINST"
  17.  
  18.  
  19. ##########################################################################
  20. #
  21. # disable_admin()
  22. #
  23. # disable admin server 
  24. #
  25. ##########################################################################
  26. disable_admin()
  27. {
  28.     if [ -x /usr/sbin/nsadmin ]; then
  29.         /usr/sbin/nsadmin disable
  30.     fi
  31. }
  32.  
  33.  
  34. ##########################################################################
  35. #
  36. # main
  37. #
  38. ##########################################################################
  39.  
  40. # stop and disable admin server
  41. disable_admin
  42.  
  43. # remove the admserv: entry from the servers.lst file
  44. if [ -f /usr/ns-home/admserv/servers.lst ]; then
  45.     cp /usr/ns-home/admserv/servers.lst /tmp/ccs_$$
  46.     sed -e "/^admserv:/d" </tmp/ccs_$$ >/usr/ns-home/admserv/servers.lst
  47.     rm /tmp/ccs_$$
  48. fi
  49.  
  50. # done
  51. exit $SUCCESS
  52.