home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / dirs / ipdevice_374.lzh / IPDevice / Install_IP_Device / Fixup_Startup < prev    next >
Text File  |  1990-10-08  |  3KB  |  104 lines

  1. failat 25
  2. mat >RAM:__check nocase search "mount IP:" T "^F line ^N: ^O" S:Startup(-Sequence|II)
  3. if not warn
  4.     echo "mount request already in Startup-Sequence...:"
  5.     type RAM:__check
  6.     delete >NIL: RAM:__check
  7.     echo "I assume that's OK..."
  8.     skip endss
  9. endif
  10. delete >NIL: RAM:__check
  11. echo ""
  12. echo "Finally, for automatic mounting of IP: at boot-up"
  13. echo "you should have a 'mount IP:' command in your startup sequence"
  14. echo "I can edit it in automatically if you like now."
  15. jask "-rShall I edit the Startup Sequence?"
  16. if not warn
  17.     echo "OK... We're all done, then."
  18.     skip endss
  19. endif
  20.  
  21. mat >NIL: search "S:StartupII" nocase S:Startup-Sequence
  22. if not warn
  23.     if not exists S:StartupII
  24.         skip mainseq
  25.     endif
  26.     mat >RAM:_MSII nolines s mount p "mount #?" label "Merge >RAM:_New_SII S:StartupII " t ^N tag ^|0 nocase first S:StartupII label " IP_Merge^B"
  27.     if not warn
  28.         echo "Other mounts appear to be in file 'S:StartupII'"
  29.     else
  30.         echo "The usual place for mounts is 'S:StartupII'"
  31.     endif
  32.     echo "Unless you think otherwise, I will insert 'mount IP:' there."
  33.     jask "-rEdit 'Mount IP:' into StartupII?"
  34.     if not warn
  35.         skip mainseq
  36.     endif
  37.     if exists S:StartupII.BAK
  38.         echo "A previous version of S:StartupII.BAK exists!"
  39.         jask "-roverwrite S:StartupII.BAK?" -q
  40.         if warn
  41.             delete >NIL: S:StartupII.BAK
  42.         else
  43.             skip mainseq
  44.         endif
  45.     endif
  46.     execute RAM:_MSII
  47.     echo "command inserted (with other mounts if poss.) in S:StartupII"
  48.     echo "The original will be preserved in S:StartupII.BAK"
  49.     copy RAM:_New_SII to S:New_StartupII
  50.     if fail
  51.         skip editfail
  52.     endif
  53.     delete >NIL: RAM:_New_SII
  54.     cd S:
  55.     rename StartupII StartupII.BAK
  56.     rename New_StartupII StartupII
  57.     cd _I_IP_:
  58.     skip endss
  59. endif
  60.  
  61. lab mainseq
  62. jask "-rEdit 'Mount IP:' into Startup-Sequence file itself?"
  63. if not warn
  64.         echo "OK -- I'll leave startup files alone"
  65.         skip endss
  66. endif
  67. if exists S:Startup-Sequence.BAK
  68.     echo "A previous version of S:Startup-Sequence.BAK exists!"
  69.     jask "-roverwrite S:Startup-Sequence.BAK?" -q
  70.     if warn
  71.         delete >NIL: S:Startup-Sequence.BAK
  72.     else
  73.         echo "OK -- I'll leave startup files alone"
  74.         skip endss
  75.     endif
  76. endif
  77. echo "I will insert the command into your main S:Startup-Sequence..."
  78. mat >RAM:_MSII p "# (mount |LoadWB)#?" t "Merge >RAM:_New_S_Seq S:Startup-Sequence ^N IP_Merge" nocase first S:Startup-Sequence
  79. if warn
  80.         echo "Sorry -- can't decide where to insert it!"
  81.         echo "I'm afraid you'll have to edit S:Startup-Sequence yourself."
  82.         skip editfail
  83. endif
  84. execute RAM:_MSII
  85. echo "command inserted (with other mounts if poss.) in S:Startup-Sequence"
  86. echo "The original will be preserved in S:Startup-Sequence.BAK"
  87. copy RAM:_New_S_Seq to S:New_Startup-Sequence
  88. if fail
  89.     skip editfail
  90. endif
  91. delete >NIL: RAM:_New_S_Seq
  92. cd S:
  93. rename Startup-Sequence Startup-Sequence.BAK
  94. rename New_Startup-Sequence Startup-Sequence
  95. cd _I_IP_:
  96. skip endss
  97.  
  98. lab editfail
  99.     echo "Editing of Startup Sequence FAILED!"
  100.     echo " -- original files left undisturbed."
  101.  
  102. lab endss
  103.  
  104.