home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3.4.17 [SPARC, PA-RISC] / nextstep33_risc.iso / usr / netware / etc / uninstallNUC < prev   
Encoding:
Text File  |  1995-02-06  |  946 b   |  42 lines

  1. #! /bin/sh
  2. ##
  3. ##        Copyright Novell Inc. 1991
  4. ##        (C) Unpublished Copyright of Novell, Inc. All Rights Reserved.
  5. ##
  6. ##        No part of this file may be duplicated, revised, translated, localized
  7. ##        or modified in any manner or compiled, linked or uploaded or
  8. ##        downloaded to or from any computer system without the prior written
  9. ##        consent of Novell, Inc.
  10. ##
  11. ##
  12. ##  Netware Unix Client 
  13. ##        Author: Duck
  14. ##       Created: Wed Aug 28 11:13:34 MDT 1991
  15. ##
  16. ##       SCCS ID: 1.5
  17. ##         delta: 12/10/91  21:35:15
  18. ##
  19.  
  20. delNUClines() {
  21.     echo Fixing $1
  22.     cp $i /tmp/$$
  23.     awk '  BEGIN { inIt=0} \
  24.     /Begin NUC addition/ {inIt=1} \
  25.     {if ( !inIt) print} \
  26.     /End NUC addition/ {inIt=0}' /tmp/$$ > $1
  27.  
  28.     rm /tmp/$$
  29. }
  30.  
  31. if /usr/ucb/whoami | /bin/grep -v -w "root" >/dev/null
  32. then
  33.     echo You must be root to uninstall NUC.
  34.     exit 1
  35. fi
  36.  
  37. FILES="/etc/rc.local $HOME/.cshrc"
  38.  
  39. for i in $FILES
  40. do delNUClines $i
  41. done
  42.