home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / uucp / wUUCP_0.0.23.lha / execute.me < prev    next >
Encoding:
AmigaDOS Script File  |  1994-04-20  |  4.8 KB  |  160 lines

  1. .key none
  2. .bra {
  3. .ket }
  4.  
  5. echo "Please READ this script first and remote the 'quit 20'"
  6. echo "command before execution! Don't say I haven't warned you ..."
  7. quit 20  ; remove this command AFTER CAREFULLY checking the contents of this script!
  8.  
  9. failat 1
  10. set tmpversionid `echo version.id`
  11.  
  12. ; first cd into another dir to make sure we find the CORRECT
  13. ; places of the commands we're looking for ... In order to
  14. ; deal with resident commands, remove all, just in case.
  15.  
  16. echo "Removing possibly RESIDENT loaded programs; just ignore the error messages."
  17.  
  18. failat 10
  19. resident remove uucico
  20. resident remove uucp
  21. resident remove uux
  22. resident remove uuxqt
  23. resident remove getty
  24. resident remove sendmail
  25. resident remove rmail
  26.  
  27. makedir kludgedir
  28. cd kludgedir
  29.  
  30. set tmpuuciconame `which uucico`
  31. set tmpuucpname `which uucp`
  32. set tmpuuxname `which uux`
  33. set tmpuuxqtname `which uuxqt`
  34. set tmpgettyname `which getty`
  35. set tmpsendmailname `which sendmail`
  36. set tmprmailname `which rmail`
  37.  
  38. ; now check wheter we did find all programs; abort on first problem,
  39. ; let the user fix it.
  40.  
  41. get tmpuuciconame
  42. if $RC not eq 0 val
  43.    skip lab goterror
  44. endif
  45. get tmpuucpname
  46. if $RC not eq 0 val
  47.    skip lab goterror
  48. endif
  49. get tmpuuxname
  50. if $RC not eq 0 val
  51.    skip lab goterror
  52. endif
  53. get tmpuuxqtname
  54. if $RC not eq 0 val
  55.    skip lab goterror
  56. endif
  57. get tmpgettyname
  58. if $RC not eq 0 val
  59.    skip lab goterror
  60. endif
  61. get tmpsendmailname
  62. if $RC not eq 0 val
  63.    skip lab goterror
  64. endif
  65. get tmprmailname
  66. if $RC not eq 0 val
  67.    skip lab goterror
  68. endif
  69.  
  70. set tmpuucpbinpath `list $tmpuuxname lformat "%p"`
  71.  
  72. cd /
  73. delete kludgedir
  74.  
  75. failat 1
  76.  
  77. echo "*Nrename $tmpuuciconame $tmpuuciconame.pre_$tmpversionid ..."
  78. rename $tmpuuciconame $tmpuuciconame.pre_$tmpversionid
  79. echo "rename $tmpuucpname $tmpuucpname.pre_$tmpversionid ..."
  80. rename $tmpuucpname $tmpuucpname.pre_$tmpversionid
  81. echo "rename $tmpuuxname $tmpuuxname.pre_$tmpversionid ..."
  82. rename $tmpuuxname $tmpuuxname.pre_$tmpversionid
  83. echo "rename $tmpuuxqtname $tmpuuxqtname.pre_$tmpversionid ..."
  84. rename $tmpuuxqtname $tmpuuxqtname.pre_$tmpversionid
  85. echo "rename $tmpgettyname $tmpgettyname.pre_$tmpversionid ..."
  86. rename $tmpgettyname $tmpgettyname.pre_$tmpversionid
  87. echo "rename $tmpsendmailname $tmpsendmailname.pre_$tmpversionid ..."
  88. rename $tmpsendmailname $tmpsendmailname.pre_$tmpversionid
  89. echo "rename $tmprmailname $tmprmailname.pre_$tmpversionid ..."
  90. rename $tmprmailname $tmprmailname.pre_$tmpversionid
  91.  
  92. echo "copy uucico $tmpuuciconame clone ..."
  93. copy uucico $tmpuuciconame clone
  94. echo "copy uucp $tmpuucpname clone ..."
  95. copy uucp $tmpuucpname clone
  96. echo "copy uux $tmpuuxname clone ..."
  97. copy uux $tmpuuxname clone
  98. echo "copy uuxqt $tmpuuxqtname clone ..."
  99. copy uuxqt $tmpuuxqtname clone
  100. echo "copy getty $tmpgettyname clone ..."
  101. copy getty $tmpgettyname clone
  102. echo "copy sendmail $tmpsendmailname clone ..."
  103. copy sendmail $tmpsendmailname clone
  104. echo "copy sendmail $tmprmailname clone ..."
  105. copy sendmail $tmprmailname clone
  106.  
  107. echo "*NInstalling auxilary files in $tmpuucpbinpath ..."
  108. copy FeatureRequest BugReport ctime FindConfig MessageID $tmpuucpbinpath clone
  109.  
  110. ; Now send a mail to the author, he just LIKES to get email =;->
  111.  
  112. echo "*NSending message about installation to bugs@hactar.hanse.de ..."
  113.  
  114. findconfig USERNAME              >env:bugreportUSERNAME
  115. findconfig REALNAME              >env:bugreportREALNAME
  116. findconfig NODENAME DOMAINNAME   >env:bugreportHOSTNAME
  117. findconfig MAILEDITOR            >env:bugreportEDITOR
  118. messageid                        >env:bugreportID
  119. ctime rfc                        >env:bugreportCTIME
  120.  
  121. echo  >t:report.form "To: bugs@hactar.hanse.de"
  122. echo >>t:report.form "From: $bugreportUSERNAME@$bugreportHOSTNAME ($bugreportREALNAME)"
  123. echo >>t:report.form "Sender: BugReport@$bugreportHOSTNAME (Script)"
  124. echo >>t:report.form "Date: $bugreportCTIME"
  125. echo >>t:report.form "Message-ID: <$bugreportID@$bugreportHOSTNAME>"
  126. echo >>t:report.form "Subject: Installed wUUCP 0.0.$tmpversionid on $bugreportCTIME"
  127. echo >>t:report.form "X-Report-For: wUUCP/-install-message-*N"
  128. echo >>t:report.form "%id:*N$bugreportID-$bugreportUSERNAME@$bugreportHOSTNAME*N%%*N"
  129. echo >>t:report.form "%path:*N$tmpuuciconame*N%%*N"
  130. echo >>t:report.form "%avail:"
  131. avail >>t:report.form
  132. echo >>t:report.form "%%*N"
  133. echo >>t:report.form "%cpu:*N`cpu`*N%%*N"
  134. echo >>t:report.form "%ver:*N`version`*N%%*N"
  135. sendmail <t:report.form
  136. delete t:report.#? env:bugreport#? quiet
  137.  
  138. echo "*NUpdate complete. PLEASE READ THE SUPPLIED 'ChangesSince_Rel#?'-files!"
  139.  
  140. skip lab cleanup
  141.  
  142. lab goterror
  143.  
  144. echo "An error occured, one or more files did not exist yet. You may need"
  145. echo "advise from an experience user -- or a more sophisticated install"
  146. echo "script =:->*N"
  147. echo "Aborting ..."
  148.  
  149. lab cleanup
  150.  
  151. unset tmpversionid
  152. unset tmpuuciconame
  153. unset tmpuucpname
  154. unset tmpuuxname
  155. unset tmpuuxqtname
  156. unset tmpgettyname
  157. unset tmpsendmailname
  158. unset tmprmailname
  159. unset tmpuucpbinpath
  160.