home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Security / lpr-wrapper-1.0.1-MIHS / lpr-wrapper.pkg / lpr-wrapper.pre_delete < prev    next >
Encoding:
Text File  |  1997-06-26  |  517 b   |  31 lines

  1. #!/bin/sh
  2. #
  3. # Written by TjL <luomat@peak.org>
  4. #
  5. # Generous help, corrections, and suggestions 
  6. # by Rex Dieter <rdieter@math.unl.edu>
  7. #
  8. #
  9. # This script operates before the deletion process takes place.
  10. # It makes sure that we are root and that the old lpr exists
  11. # where we expect it to
  12.  
  13. ME=`/usr/ucb/whoami`
  14.  
  15. if [ "$ME" != "root" ]
  16. then
  17.     echo "Only root can uninstall this package"
  18.     exit 1
  19. fi
  20.  
  21.  
  22. if [ ! -r /usr/ucb/lpr.orig ]
  23. then
  24.     echo "Error: cannot find the original lpr (/usr/ucb/lpr.orig)"
  25.     exit 1
  26. fi
  27.  
  28.  
  29. exit 0
  30.  
  31.