home *** CD-ROM | disk | FTP | other *** search
- failat 25
- mat >RAM:__check nocase search "mount IP:" T "^F line ^N: ^O" S:Startup(-Sequence|II)
- if not warn
- echo "mount request already in Startup-Sequence...:"
- type RAM:__check
- delete >NIL: RAM:__check
- echo "I assume that's OK..."
- skip endss
- endif
- delete >NIL: RAM:__check
- echo ""
- echo "Finally, for automatic mounting of IP: at boot-up"
- echo "you should have a 'mount IP:' command in your startup sequence"
- echo "I can edit it in automatically if you like now."
- jask "-rShall I edit the Startup Sequence?"
- if not warn
- echo "OK... We're all done, then."
- skip endss
- endif
-
- mat >NIL: search "S:StartupII" nocase S:Startup-Sequence
- if not warn
- if not exists S:StartupII
- skip mainseq
- endif
- 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"
- if not warn
- echo "Other mounts appear to be in file 'S:StartupII'"
- else
- echo "The usual place for mounts is 'S:StartupII'"
- endif
- echo "Unless you think otherwise, I will insert 'mount IP:' there."
- jask "-rEdit 'Mount IP:' into StartupII?"
- if not warn
- skip mainseq
- endif
- if exists S:StartupII.BAK
- echo "A previous version of S:StartupII.BAK exists!"
- jask "-roverwrite S:StartupII.BAK?" -q
- if warn
- delete >NIL: S:StartupII.BAK
- else
- skip mainseq
- endif
- endif
- execute RAM:_MSII
- echo "command inserted (with other mounts if poss.) in S:StartupII"
- echo "The original will be preserved in S:StartupII.BAK"
- copy RAM:_New_SII to S:New_StartupII
- if fail
- skip editfail
- endif
- delete >NIL: RAM:_New_SII
- cd S:
- rename StartupII StartupII.BAK
- rename New_StartupII StartupII
- cd _I_IP_:
- skip endss
- endif
-
- lab mainseq
- jask "-rEdit 'Mount IP:' into Startup-Sequence file itself?"
- if not warn
- echo "OK -- I'll leave startup files alone"
- skip endss
- endif
- if exists S:Startup-Sequence.BAK
- echo "A previous version of S:Startup-Sequence.BAK exists!"
- jask "-roverwrite S:Startup-Sequence.BAK?" -q
- if warn
- delete >NIL: S:Startup-Sequence.BAK
- else
- echo "OK -- I'll leave startup files alone"
- skip endss
- endif
- endif
- echo "I will insert the command into your main S:Startup-Sequence..."
- mat >RAM:_MSII p "# (mount |LoadWB)#?" t "Merge >RAM:_New_S_Seq S:Startup-Sequence ^N IP_Merge" nocase first S:Startup-Sequence
- if warn
- echo "Sorry -- can't decide where to insert it!"
- echo "I'm afraid you'll have to edit S:Startup-Sequence yourself."
- skip editfail
- endif
- execute RAM:_MSII
- echo "command inserted (with other mounts if poss.) in S:Startup-Sequence"
- echo "The original will be preserved in S:Startup-Sequence.BAK"
- copy RAM:_New_S_Seq to S:New_Startup-Sequence
- if fail
- skip editfail
- endif
- delete >NIL: RAM:_New_S_Seq
- cd S:
- rename Startup-Sequence Startup-Sequence.BAK
- rename New_Startup-Sequence Startup-Sequence
- cd _I_IP_:
- skip endss
-
- lab editfail
- echo "Editing of Startup Sequence FAILED!"
- echo " -- original files left undisturbed."
-
- lab endss
-
-