home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 56 / af056sub.adf / parnfs.lha / Install-ParNFS < prev    next >
Text File  |  1993-12-02  |  3KB  |  118 lines

  1. ; ParNFS Installation :vi:nosi:noai
  2. ; $VER: $Id: Install-ParNFS,v 1.3 1993/12/02 22:53:24 Rhialto Exp $
  3.  
  4. (set @app-name "ParNFS")
  5. (welcome @app-name "Installation")
  6.  
  7. (if (exists "ParNFS_Stuff:" (noreq))
  8.     (set STUFF (expandpath "ParNFS_Stuff:/"))
  9.     (set STUFF "Work:ParNFS")
  10. )
  11.  
  12. (set STUFF
  13.     (askdir
  14.     (prompt "Where do you want to install" @app-name "?")
  15.     (help @askdir-help)
  16.     (default STUFF)
  17.     )
  18. )
  19.  
  20. (set STUFF (tackon STUFF "ParNFS"))
  21. (makedir STUFF (infos))
  22. (makeassign "ParNFS_Stuff" STUFF)
  23.  
  24. (set AMIGANUM
  25.     (+ 1 (askchoice
  26.     (prompt "Install for which Amiga?")
  27.     (choices "Amiga 1: the primary server"
  28.          "Amiga 2: the primary client")
  29.     (default 2)             ; invalid ie no choice
  30.     (help @askchoice-help)
  31.     ))
  32. )
  33.  
  34. (set Mountlist
  35.     (select AMIGANUM "" "Mountlist.Quick.2nd" "Mountlist.Quick.1st")
  36. )
  37.  
  38. (copyfiles
  39.     (prompt "Copying client and server code")
  40.     (source "")
  41.     (dest STUFF)
  42.     (choices
  43.          "QuickSetup"
  44.          "parnet.device"
  45.          "NetworkFileServer"
  46.          "NetworkFileSystem"
  47.          Mountlist)
  48.     (infos)
  49.     (confirm)
  50.     (help (cat "You always need \"QuickSetup\" and \"parnet.device\".\n"
  51.           "For a server, you need \"NetworkFileServer\".\n"
  52.           "For a client, you need the other files.\n\n"
  53.           @copyfiles-help))
  54. )
  55.  
  56. ;;;;
  57. ;
  58. ; Only ask experienced user to edit the QuickSetup script
  59.  
  60. (if (>= @user-level 2) (
  61.     (set Editor "")
  62.     (if (> 0 (exists "ENV:EDITOR")) (
  63.     (set Editor (getenv "EDITOR"))
  64.     (if (= 0 (exists Editor) (set Editor "")))
  65.     ))
  66.     (if (and (= Editor "") (exists "SYS:Tools/MEmacs"))
  67.     (set Editor "SYS:Tools/MEmacs")
  68.     )
  69.     (if (and (= Editor "") (exists "C:Ed"))
  70.     (set Editor "C:Ed")
  71.     )
  72.  
  73.     (if (not (= Editor ""))
  74.     (run (cat Editor " QuickSetup")
  75.         (prompt "Do you want to edit the QuickSetup script? "
  76.             "You may want to do this do automatically create "
  77.             "references to volumes on the server machine, "
  78.             "so you'll have some icons for the Workbench.")
  79.         (confirm)
  80.         (help @run-help)
  81.     )
  82.     )
  83. ))
  84.  
  85. (set bootopt
  86.     (askoptions
  87.     (prompt "Do you want to start ParNFS automatically every time "
  88.         "your Amiga boots?")
  89.     (choices "Client" "Server")
  90.     (default 3)
  91.     (help @askoptions-help)
  92.     )
  93. )
  94.  
  95. (set cmd2 "")
  96. (if (in bootopt 0 1) (set cmd2 "run Execute ParNFS_Stuff:QuickSetup"))
  97. (if (in bootopt 0)   (set cmd2 (cat cmd2 " client")))
  98. (if (in bootopt 1)   (set cmd2 (cat cmd2 " server")))
  99. (if (in bootopt 0 1) (set cmd2 (cat cmd2 " " AMIGANUM " Quiet\n")))
  100.  
  101. (set UserStartup (cat
  102.     "Assign ParNFS_Stuff: \"" STUFF "\"\n"
  103.     cmd2
  104. ))
  105.  
  106. (startup @app-name
  107.     (prompt (cat
  108.         "One Assign needs to be added to the \"S:user-startup\" "
  109.         "so that your system will be properly configured to use "
  110.         @app-name ".\n\n"
  111.         "The Network also needs to be started before use.\n\n"
  112.         "Remember to copy the \"Node.rinfo\" icon to all disks "
  113.         "that you want to be visible on a networked Workbench."
  114.     ))
  115.     (command UserStartup)
  116.     (help @startup-help)
  117. )
  118.