home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 11 / 11.iso / n / n003 / 8.ddi / ADPCNFSD.CSH < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  1991-02-13  |  2.2 KB  |  94 lines

  1. #!/bin/csh
  2. #  @(#)adpcnfsd.csh    9.5     10/17/90
  3. #
  4. # adpcnfsd.csh
  5. #
  6. # This script will make rpc.pcnfsd, move it to the correct place on your
  7. # system, then edit the appropriate file to allow the daemon to start up
  8. # whenever you reboot your system.
  9. #
  10. # The preferred method of starting rpc.pcnfsd is from inetd.  This script will
  11. # modify either your /etc/servers file (for SunOS 3.X) or /etc/inetd.conf
  12. # file (for SunOS 4.X).  If you wish to instead start rpc.pcnfsd from 
  13. # rc.local as a normal daemon, then you should refer to the section in the
  14. # Installing PC-NFS guide that discusses installing server software.  Also
  15. # make sure you read the READ THIS FIRST guide.
  16. #
  17. #
  18. # To use this script you must first have copied the following files from the
  19. # PC-NFS "Server 1" diskette:
  20. #        adpcnfsd.csh   ( this file )
  21. #        r_pcnfsd.c
  22. # to some place on the system you are going to perform the install.  Usually
  23. # /usr/tmp is a good place. (Note that the file name "r_pcnfsd.c"
  24. # is dictated by DOS file name conventions: this script will rename
  25. # the file to "rpc.pcnfsd.c".)
  26. #
  27. # You then must become root on the machine you are intending to add the
  28. # rpc.pcnfsd to.  Then run this script.  There are no arguments.
  29. #
  30.  
  31.  
  32. if ( $#argv > 0 ) then
  33.     echo " "
  34.     echo "   Usage: adpcnfsd"
  35.     echo " "
  36.     exit (1)
  37. endif
  38.  
  39. echo " "
  40. echo "Add RPC.PCNFSD shell script"
  41. echo " "
  42. echo
  43.  
  44. echo "Renaming R_PCNFSD.C as RPC.PCNFSD.C"
  45. mv r_pcnfsd.c rpc.pcnfsd.c
  46. echo "Compiling RPC.PCNFSD"
  47. cc -o rpc.pcnfsd rpc.pcnfsd.c
  48. strip rpc.pcnfsd
  49.  
  50. echo " "
  51. echo "Compilation complete."
  52. echo "Moving RPC.PCNFSD to /usr/etc directory."
  53.  
  54. mv rpc.pcnfsd /usr/etc
  55.  
  56. echo " "
  57.  
  58. if ( -f /etc/servers ) then
  59. echo "Editing servers file."
  60. ed  - /etc/servers  <<EOFSTRING
  61. a
  62. rpc    udp    /usr/etc/rpc.pcnfsd    150001    1
  63. .
  64. w
  65. q
  66. EOFSTRING
  67. #
  68.  
  69. else if ( -f /etc/inetd.conf ) then
  70. echo "Editing inetd.conf file."
  71. ed  - /etc/inetd.conf  <<EOFSTRING
  72. a
  73. pcnfsd/1 dgram    rpc/udp    wait    root    /usr/etc/rpc.pcnfsd    rpc.pcnfsd
  74. .
  75. w
  76. q
  77. EOFSTRING
  78. #
  79. else
  80. echo "No /etc/servers or /etc/inetd.conf file."
  81. echo "RPC.PCNFSD built - you should make sure it is started each time"
  82. echo "your system is booted."
  83. echo " "
  84. exit(1)
  85. endif
  86.  
  87. echo " "
  88. echo "ADPCNFSD.CSH script completed."
  89. echo "You can start the daemon now by typing /usr/etc/rpc.pcnfsd."
  90. echo " "
  91. echo " "
  92.  
  93.  
  94.