home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / SNUUPM27.ZIP / INSTALL.MNU < prev    next >
Encoding:
Text File  |  1995-04-23  |  27.1 KB  |  746 lines

  1. ; -----------------------------------------------------------------
  2. ;  install.mnu
  3. ;  -----------
  4. ;
  5. ;  An easy way to install or update the SNUUPM package.
  6. ;  Based on ideas from Eberhard Lisse (el@lisse.na).
  7. ;
  8. ;  Most of the environment variables are set up in INSTALL.BAT
  9. ;  The SNU_FULL environment variable is passed on to the SNUUPM.BAT
  10. ;  file, for use by the MAIN.MNU of SNUUPM.
  11. ;
  12. ;  $Id: snuupmxx.mnu 1.1 1995/04/22 21:53:16 mlawrie Exp $
  13. ;  $Log: snuupmxx.mnu $
  14. ;  Revision 1.1  1995/04/22 21:53:16  mlawrie
  15. ;  Initial revision
  16. ;
  17. ; -----------------------------------------------------------------
  18.  
  19. #header message = SNUUPM Installation v%snu_inst_ver% being done on
  20. #f10 = Exit from Installation Menu
  21.    #exit
  22. #display,0,3
  23.   "INSTALLATION VALUES:-"
  24. #display,0,5
  25.   "Hostname '%snu_host%.%snu_dom%', connecting to '%snu_mserv%'"
  26. #display,0,7
  27.   "at '%snu_phone%', logging in as '%snu_login%', with"
  28. #display,0,9
  29.   "password '%snu_passwd%', on behalf of the"
  30. #display,0,11
  31.   "organisation '%snu_org%'."
  32. #display,0,13
  33.   "The '%snu_mdm%' modem operates at"
  34. #display,0,15
  35.   "pc-to-modem baud rate '%snu_baud%'"
  36.  
  37. #if %snu_passwd%==XxXxXxXx
  38. #display,0,21,2
  39.   "Your PASSWORD needs to be set correctly"
  40. #endif
  41.    
  42. %Installation Menu,47,11
  43. First configure
  44. Use the Default Values
  45.    call instdef.bat
  46. #if %snu_sav%
  47. Load the Previous Setup
  48.    call %sndrive%\usr\lib\snuupm\instsave.bat
  49. #endif
  50. Manual Setup (incl PASSWORD)
  51.    %System Setup (<esc> returns)
  52.  
  53. then toggle
  54. #if %snu_full%
  55. Option: both Mail and News
  56.    set snu_full=
  57. #else
  58. Option: Mail-only
  59.    set snu_full=y
  60. #endif
  61.  
  62. and lastly, Install
  63.  
  64. INSTALL (use F10 to Exit)
  65.  
  66.    rem
  67.    echo Installing the SNUUPM control files.
  68.    rem 
  69.    if exist %snu_p1%\hostpath.bak del %snu_p1%\hostpath.bak>%nul%
  70.    if exist %snu_p1%\hostpath ren %snu_p1%\hostpath hostpath.bak>%nul%
  71.    if exist %snu_p2%\aliases.bak del %snu_p2%\aliases.bak>%nul%
  72.    if exist %snu_p2%\aliases.txt ren %snu_p2%\aliases.txt aliases.bak>%nul%
  73.    if exist %snu_p2%\utl\mainmnu.bak del %snu_p2%\utl\mainmnu.bak>%nul%
  74.    if exist %snu_p2%\utl\main.mnu ren %snu_p2%\utl\main.mnu mainmnu.bak>%nul%
  75.    if exist %snu_p2%\utl\mainbat.bak del %snu_p2%\utl\mainbat.bak>%nul%
  76.    if exist %snu_p2%\utl\main.bat ren %snu_p2%\utl\main.bat mainbat.bak>%nul%
  77.    pkunzip -o -d snuupm.zip %sndrive%\ @%snu_pmfil%>%nul%
  78.  
  79.    rem ----SNUUPM.BAT-----------------------------------------------
  80.    set snu_file=%sndrive%\usr\lib\snuupm\snuupm.bat
  81.    echo Creating %snu_file%
  82.    echo @echo off>%snu_file%
  83.    echo rem ----------------------------->>%snu_file%
  84.    echo rem  %%sndrive%%\usr\lib\snuupm\snuupm.bat>>%snu_file%
  85.    echo rem>>%snu_file%
  86.    echo rem  Sets the environment for a user of snuupm,>>%snu_file%
  87.    echo rem  and invokes the main menu>>%snu_file%
  88.    echo rem  Author: Mike Lawrie (mlawrie@apies.frd.ac.za), Aug 1994>>%snu_file%
  89.    echo rem ----------------------------->>%snu_file%
  90.    echo.>>%snu_file%
  91.    echo set snu_full=%snu_full%>>%snu_file%
  92.    echo set snu_vers=%snu_vers%>>%snu_file%
  93.    echo set snu_hd=%snu_host%.%snu_dom%>>%snu_file%
  94.    echo.>>%snu_file%
  95.    echo if "%%1"=="" goto pmuser>>%snu_file%
  96.    echo set snu_usr=%%1>>%snu_file%
  97.    echo goto gotuser>>%snu_file%
  98.    echo.>>%snu_file%
  99.    echo :pmuser>>%snu_file%
  100.    echo if "%%pmuser%%" == "" goto nouser>>%snu_file%
  101.    echo set snu_usr=%%pmuser%%>>%snu_file%
  102.    echo goto gotuser>>%snu_file%
  103.    echo.>>%snu_file%
  104.    echo :nouser>>%snu_file%
  105.    echo set askenv=>>%snu_file%
  106.    echo %%sndrive%%\usr\lib\snuupm\askenv Enter your SNUUPM user-id:->>%snu_file%
  107.    echo if "%%askenv%%"=="" goto exit>>%snu_file%
  108.    echo set pmuser=%%askenv%%>>%snu_file%
  109.    echo set askenv=>>%snu_file%
  110.    echo goto pmuser>>%snu_file%
  111.    echo.>>%snu_file%
  112.    echo rem ----------------------------->>%snu_file%
  113.    echo rem   Save the current environment (Go Green!)>>%snu_file%
  114.    echo rem ----------------------------->>%snu_file%
  115.    echo :gotuser>>%snu_file%
  116.    echo set uupcusrrx=%%UUPCUSRRC%%>>%snu_file%
  117.    echo set snewsrx=%%SNEWSRC%%>>%snu_file%
  118.    echo set homex=%%HOME%%>>%snu_file%
  119.    echo rem ----------------------------->>%snu_file%
  120.    echo rem  Set up the files for the USER-ID>>%snu_file%
  121.    echo rem ----------------------------->>%snu_file%
  122.    echo set uupcusrrc=%%sndrive%%\usr\%%snu_usr%%\%%snu_usr%%.rc>>%snu_file%
  123.    echo set snewsrc=%%sndrive%%\usr\%%snu_usr%%\snews.rc>>%snu_file%
  124.    echo set pmuserx=%%PMUSER%%>>%snu_file%
  125.    echo set home=%%sndrive%%\usr\%%snu_usr%%>>%snu_file%
  126.    echo rem ----------------------------->>%snu_file%
  127.    echo rem  Verify that the user's .RC files exist>>%snu_file%
  128.    echo rem ----------------------------->>%snu_file%
  129.    echo if not exist %%UUPCUSRRC%% goto error1>>%snu_file%
  130.    echo if not exist %%SNEWSRC%% goto error2>>%snu_file%
  131.    echo set pmuser=%%snu_usr%%>>%snu_file%
  132.    echo %%comspec%% /e:2048 /c%%sndrive%%\usr\lib\snuupm\utl\main.bat>>%snu_file%
  133.    echo goto ends>>%snu_file%
  134.    echo rem ----------------------------->>%snu_file%
  135.    echo rem   Come here to issue an error message>>%snu_file%
  136.    echo rem ----------------------------->>%snu_file%
  137.    echo :error1>>%snu_file%
  138.    echo echo The file "%%UUPCUSRRC%%" doesn't exist.>>%snu_file%
  139.    echo goto err>>%snu_file%
  140.    echo :error2>>%snu_file%
  141.    echo echo The file "%%SNEWSRC%%" doesn't exist.>>%snu_file%
  142.    echo goto err>>%snu_file%
  143.    echo :err>>%snu_file%
  144.    echo echo Please check to see if "%%SNU_USR%%" is a valid user.>>%snu_file%
  145.    echo pause>>%snu_file%
  146.    echo goto ends>>%snu_file%
  147.    echo rem ----------------------------->>%snu_file%
  148.    echo rem   Reset variables and exit>>%snu_file%
  149.    echo rem ----------------------------->>%snu_file%
  150.    echo :ends>>%snu_file%
  151.    echo set uupcusrrc=%%UUPCUSRRX%%>>%snu_file%
  152.    echo set uupcusrrx=>>%snu_file%
  153.    echo set snewsrc=%%SNEWSRX%%>>%snu_file%
  154.    echo set snewsrx=>>%snu_file%
  155.    echo set pmuser=%%PMUSERX%%>>%snu_file%
  156.    echo set pmuserx=>>%snu_file%
  157.    echo set home=%%HOMEX%%>>%snu_file%
  158.    echo set homex=>>%snu_file%
  159.    echo set askenv=>>%snu_file%
  160.    echo set snu_usr=>>%snu_file%
  161.    echo set snu_hd=>>%snu_file%
  162.    echo :exit>>%snu_file%
  163.    echo rem ----ends--------------------->>%snu_file%
  164.    if "%debug%"=="" goto no_dbg1
  165.    if "%editor%"=="" goto no_dbg1
  166.    if exist %editor% %editor% %snu_file%
  167.    :no_dbg1
  168.    set snu_file=
  169.  
  170.  
  171.    rem ----CALLOUT.BAT-----------------------------------------------
  172.    set snu_file=%sndrive%\usr\lib\snuupm\callout.bat
  173.    echo Creating %snu_file%
  174.    echo @echo off>%snu_file%
  175.    echo rem ---------------------------------------------------------->>%snu_file%
  176.    echo rem  %sndrive%\usr\lib\snuupm\callout.bat>>%snu_file%
  177.    echo rem ---------------------------------------------------------->>%snu_file%
  178.    echo %sndrive%\usr\lib\snuupm\uucico -s %snu_mserv%>>%snu_file%
  179.    echo if errorlevel 1 goto abort>>%snu_file%
  180.    echo %sndrive%\usr\lib\snuupm\uuxqt>>%snu_file%
  181.    echo if errorlevel 1 goto abort>>%snu_file%
  182.    echo rem ---------------------------------------------------------->>%snu_file%
  183.    echo %sndrive%\usr\lib\snuupm\unbatch>>%snu_file%
  184.    echo if errorlevel 1 goto abort>>%snu_file%
  185.    echo rem ---------------------------------------------------------->>%snu_file%
  186.    echo rem Move incoming mail to be accessible to PMAIL>>%snu_file%
  187.    echo rem>>%snu_file%
  188.    echo call %sndrive%\usr\lib\snuupm\burst>>%snu_file%
  189.    echo goto ends>>%snu_file%
  190.    echo rem ---------------------------------------------------------->>%snu_file%
  191.    echo :abort>>%snu_file%
  192.    echo pause CALLOUT.BAT run failed>>%snu_file%
  193.    echo goto ends>>%snu_file%
  194.    echo rem ---------------------------------------------------------->>%snu_file%
  195.    echo :ends>>%snu_file%
  196.    echo rem ----ends-------------------------------------------------->>%snu_file%
  197.    if "%debug%"=="" goto no_dbg2
  198.    if "%editor%"=="" goto no_dbg2
  199.    if exist %editor% %editor% %snu_file%
  200.    :no_dbg2
  201.    set snu_file=
  202.  
  203.  
  204.    echo Making the uuPC directories
  205.    if not exist %sndrive%\usr\spool\nul md %sndrive%\usr\spool>%nul%
  206.    if not exist %sndrive%\usr\spool\archive\nul md %sndrive%\usr\spool\archive>%nul%
  207.    if not exist %sndrive%\usr\spool\mail\nul md %sndrive%\usr\spool\mail>%nul%
  208.    if not exist %sndrive%\usr\spool\news\nul md %sndrive%\usr\spool\news>%nul%
  209.    if not exist %sndrive%\usr\spool\news\incoming\nul md %sndrive%\usr\spool\news\incoming>%nul%
  210.    if not exist %sndrive%\usr\spool\public\nul md %sndrive%\usr\spool\public>%nul%
  211.    if not exist %sndrive%\usr\root\mail\nul md %sndrive%\usr\root\mail>%nul%
  212.    if not exist %sndrive%\tmp\nul md %sndrive%\tmp>%nul%
  213.  
  214.    rem
  215.    echo Making the HISTORY file
  216.    rem
  217.    echo x>%sndrive%\usr\spool\news\history
  218.  
  219.    rem
  220.    echo Extracting the uuPC programs
  221.    rem  %snu_p2% is the path %sndrive%\usr\lib\snuupm
  222.    rem  %snu_fad% is the UUPC .ZIP file containing ALIASES.TXT
  223.    rem  %snu_fd1% is the UUPC .ZIP file containing MAIL.EXE, RMAIL.EXE
  224.    rem            UUCICO.EXE and UUXQT.EXE
  225.    rem  %snu_fd2% is the UUPC .ZIP file containing UUX.COM, UUCP.COM
  226.    rem            and UUSTAT.COM
  227.    rem
  228.    pkunzip %snu_fad% %snu_p2% aliases.txt>%nul%
  229.    if not errorlevel 0 goto uupc1
  230.  
  231.    if exist %snu_p2%\mail.exe del %snu_p2%\mail.exe>%nul%
  232.    if exist %snu_p2%\rmail.exe del %snu_p2%\rmail.exe>%nul%
  233.    if exist %snu_p2%\uucico.exe del %snu_p2%\uucico.exe>%nul%
  234.    if exist %snu_p2%\uuxqt.exe del %snu_p2%\uuxqt.exe>%nul%
  235.    pkunzip %snu_fd1% %snu_p2% mail.exe rmail.exe uucico.exe uuxqt.exe>%nul%
  236.    if not errorlevel 0 goto uupc1
  237.  
  238.    if exist %snu_p2%\uux.com del %snu_p2%\uux.com>%nul%
  239.    if exist %snu_p2%\uucp.com del %snu_p2%\uucp.com>%nul%
  240.    if exist %snu_p2%\uucp.exe del %snu_p2%\uucp.exe>%nul%
  241.    if exist %snu_p2%\uustat.com del %snu_p2%\uustat.com>%nul%
  242.    pkunzip %snu_fd2% %snu_p2% uux.com uucp.exe uustat.com>%nul%
  243.    if not errorlevel 0 goto uupc1
  244.  
  245.    goto uupc2
  246.    :uupc1
  247.    echo.
  248.    echo.
  249.    echo Some files have failed to unzip. Maybe this is because you are using
  250.    echo a version of pkunzip earlier than 2.04g.
  251.    echo.
  252.    pause
  253.    :uupc2
  254.  
  255.  
  256.    rem ----SYSTEMS-----------------------------------------------
  257.    set snu_file=%sndrive%\etc\uupc\systems
  258.    echo Creating %snu_file%
  259.    rem
  260.    rem  Preserving what we can of the existing file
  261.    rem
  262.    if not exist %snu_file% goto syst1
  263.    echo %tab% Copying the existing %snu_file% into %snu_file%.BAK
  264.    if exist %snu_file%.bak del %snu_file%.bak>%nul%
  265.    ren %snu_file% systems.bak>%nul%
  266.    :syst1
  267.    rem
  268.    rem  Create a .$$$ file that excludes unwanted line(s)
  269.    rem  This could be an empty or a non-existent file, so what?
  270.    rem
  271.    if exist %snu_file%.$$$ del %snu_file%.$$$
  272.    if not exist %snu_file%.bak goto syst2
  273.    type %snu_file%.bak | find /v "%snu_mserv%">%snu_file%.$$$
  274.    :syst2
  275.    rem
  276.    rem  Append new lines
  277.    rem
  278.    echo %snu_mserv% Any modem %snu_baud% %snu_phone% g ogin:--ogin: %snu_login% word: %snu_passwd%>>%snu_file%.$$$
  279.    rem
  280.    rem  Rename .$$$ file to be the required file
  281.    rem
  282.    ren %snu_file%.$$$ systems>%nul%
  283.  
  284.    if "%debug%"=="" goto no_dbg3
  285.    if "%editor%"=="" goto no_dbg3
  286.    if exist %editor% %editor% %snu_file%
  287.    :no_dbg3
  288.    set snu_file=
  289.  
  290.  
  291.    rem ----PASSWD-----------------------------------------------
  292.    set snu_file=%sndrive%\etc\uupc\passwd
  293.    echo Creating %snu_file%
  294.    rem
  295.    rem  Preserving what we can of the existing file
  296.    rem
  297.    if not exist %snu_file% goto pass1
  298.    echo %tab% Copying the existing %snu_file% into %snu_file%.BAK
  299.    if exist %snu_file%.bak del %snu_file%.bak>%nul%
  300.    ren %snu_file% passwd.bak>%nul%
  301.    :pass1
  302.    rem
  303.    rem  Create a .$$$ file that excludes unwanted line(s). We need
  304.    rem  to exclude the lines with "root" and with the mailserver.
  305.    rem  This could result in an empty or a non-existent file, so what?
  306.    rem
  307.    if exist %snu_file%.$$1 del %snu_file%.$$1
  308.    if not exist %snu_file%.bak goto pass2
  309.    type %snu_file%.bak | find /v "%snu_mserv%">%snu_file%.$$1
  310.    if exist %snu_file%.$$$ del %snu_file%.$$$
  311.    if not exist %snu_file%.$$1 goto pass2
  312.    type %snu_file%.$$1 | find /v "root">%snu_file%.$$$
  313.    :pass2
  314.    rem
  315.    rem  Append new lines
  316.    rem
  317.    echo %snu_mserv%:*:::%snu_mserv% mailserver>>%snu_file%.$$$
  318.    echo root:*:::Super User:%sndrive%\usr\root>>%snu_file%.$$$
  319.    rem
  320.    rem  Rename .$$$ file to be the required file
  321.    rem
  322.    ren %snu_file%.$$$ passwd>%nul%
  323.    if exist %snu_file%.$$1 del %snu_file%.$$1
  324.  
  325.    if "%debug%"=="" goto no_dbg4
  326.    if "%editor%"=="" goto no_dbg4
  327.    if exist %editor% %editor% %snu_file%
  328.    :no_dbg4
  329.    set snu_file=
  330.  
  331.  
  332.    rem ----UUPC.RC-----------------------------------------------
  333.    set snu_file=%sndrive%\etc\uupc\uupc
  334.    echo Creating %snu_file%.rc
  335.  
  336.    if not exist %snu_file%.rc goto uupcrc1
  337.    echo %tab% Copying the existing %snu_file%.rc into %snu_file%.BAK
  338.    if exist %snu_file%.bak del %snu_file%.bak>%nul%
  339.    copy %snu_file%.rc %snu_file%.bak>%nul%
  340.    :uupcrc1
  341.  
  342.    echo postmaster=root>%snu_file%.rc
  343.    echo confdir=%sndrive%\etc\uupc>>%snu_file%.rc
  344.    echo maildir=%sndrive%\usr\spool\mail>>%snu_file%.rc
  345.    echo newsdir=%sndrive%\usr\spool\news\incoming>>%snu_file%.rc
  346.    echo spooldir=%sndrive%\usr\spool>>%snu_file%.rc
  347.    echo pubdir=%sndrive%\usr\spool\public>>%snu_file%.rc
  348.    echo tempdir=%sndrive%\tmp>>%snu_file%.rc
  349.    echo rmail=%sndrive%\usr\lib\snuupm\rmail.exe>>%snu_file%.rc
  350.    echo rnews=%sndrive%\usr\lib\snuupm\rnews.exe>>%snu_file%.rc
  351.    echo options=nobang>>%snu_file%.rc
  352.    echo options=multiqueue>>%snu_file%.rc
  353.    echo options=snews>>%snu_file%.rc
  354.    echo options=collect>>%snu_file%.rc
  355.    echo uncompress=%sndrive%\usr\lib\snuupm\compress -d %%s>>%snu_file%.rc
  356.    echo archivedir=%sndrive%\usr\spool\archive>>%snu_file%.rc
  357.    echo inmodem=modem>>%snu_file%.rc
  358.    echo mailserv=%snu_mserv%>>%snu_file%.rc
  359.    echo organization=%snu_org%>>%snu_file%.rc
  360.    echo banner=banner>>%snu_file%.rc
  361.    echo nodename=%snu_host%>>%snu_file%.rc
  362.    echo domain=%snu_host%.%snu_dom%>>%snu_file%.rc
  363.    if "%debug%"=="" goto no_dbg5
  364.    if "%editor%"=="" goto no_dbg5
  365.    if exist %editor% %editor% %snu_file%.rc
  366.    :no_dbg5
  367.    set snu_file=
  368.  
  369.    rem ----PERMISSN-----------------------------------------------
  370.    rem  There is a change in format of this file as from SNUUPM22.
  371.    rem  If SNUUPM22 has already been installed, then there should
  372.    rem  be a /usr/lib/snuupm/instsave.bat file in existence. Use
  373.    rem  this as the criteria to try to preserve the information in
  374.    rem  the /etc/uupc/permissn file.
  375.    rem
  376.    set snu_file=%sndrive%\etc\uupc\permissn
  377.    echo Creating %snu_file%
  378.    if not exist %snu_file% goto perm1
  379.    rem
  380.    rem  Preserving what we can of the existing file
  381.    rem
  382.    echo %tab% Copying the existing %snu_file% into %snu_file%.BAK
  383.    if exist %snu_file%.bak del %snu_file%.bak>%nul%
  384.    ren %snu_file% permissn.bak>%nul%
  385.    :perm1
  386.    rem
  387.    rem  Create a .$$$ file that excludes unwanted line(s)
  388.    rem  This could be an empty or a non-existent file, so what?
  389.    rem
  390.    if exist %snu_file%.$$$ del %snu_file%.$$$
  391.    if not exist %snu_file%.bak goto perm2
  392.    if not exist %sndrive%/usr/lib/snuupm/instsave.bat goto perm2
  393.    type %snu_file%.bak | find /v "%snu_mserv%">%snu_file%.$$$
  394.    :perm2
  395.    rem
  396.    rem  Append new lines
  397.    rem
  398.    echo LOGNAME=%snu_mserv% SENDFILES=yes REQUEST=yes COMMANDS=rmail:rnews:uucp \>>%snu_file%.$$$
  399.    echo %tab% VALIDATE=%snu_mserv% READ=%sndrive%/usr/spool/public \>>%snu_file%.$$$
  400.    echo %tab% MACHINE=%snu_mserv% WRITE=%sndrive%/usr/spool/public>>%snu_file%.$$$
  401.    rem
  402.    rem  Rename .$$$ file to be the required file
  403.    rem
  404.    ren %snu_file%.$$$ permissn>%nul%
  405.  
  406.    if "%debug%"=="" goto no_dbg9
  407.    if "%editor%"=="" goto no_dbg9
  408.    if exist %editor% %editor% %snu_file%
  409.    :no_dbg9
  410.    set snu_file=
  411.  
  412.  
  413.    rem ----ROOT-----------------------------------------------
  414.    set snu_file=%sndrive%\usr\root\root.rc
  415.    echo Creating the user called "root"
  416.    echo Name=Super User>%snu_file%
  417.    echo Mailbox=root>>%snu_file%
  418.    echo Home=%sndrive%\usr\root>>%snu_file%
  419.    echo Signature=%sndrive%\usr\root\mbox\inetsig.pms>>%snu_file%
  420.    echo Editor=%editor% %%s>>%snu_file%
  421.    echo Aliases=%sndrive%\usr\root\aliases.txt>>%snu_file%
  422.    if "%debug%"=="" goto no_dbg6
  423.    if "%editor%"=="" goto no_dbg6
  424.    if exist %editor% %editor% %snu_file%
  425.    :no_dbg6
  426.    set snu_file=%sndrive%\usr\root\snews.rc
  427.    echo Name=Super User>%snu_file%
  428.    echo Mailbox=root>>%snu_file%
  429.    echo Home=%sndrive%\usr\root\>>%snu_file%
  430.    echo Aliases=%sndrive%\usr\root\aliases.txt>>%snu_file%
  431.    echo Editor=%editor% %%s>>%snu_file%
  432.    echo Signature=mbox\inetsig.pms>>%snu_file%
  433.    echo colorhelpf whi+>>%snu_file%
  434.    echo colortextf whi+>>%snu_file%
  435.    echo colorheadb blu>>%snu_file%
  436.    echo colorheadf whi>>%snu_file%
  437.    echo colormsgb blu>>%snu_file%
  438.    echo colormsgf whi>>%snu_file%
  439.    echo Extract=~\extract.nws>>%snu_file%
  440.    if "%debug%"=="" goto no_dbg7
  441.    if "%editor%"=="" goto no_dbg7
  442.    if exist %editor% %editor% %snu_file%
  443.    :no_dbg7
  444.    set snu_file=
  445.  
  446.  
  447.    rem ----BANNER-----------------------------------------------
  448.    set snu_file=%sndrive%\etc\uupc\banner
  449.    echo Creating %snu_file%
  450.  
  451.    if not exist %snu_file% goto bann1
  452.    echo %tab% Copying the existing %snu_file% into %snu_file%.BAK
  453.    if exist %snu_file%.bak del %snu_file%.bak>%nul%
  454.    copy %snu_file% %snu_file%.bak>%nul%
  455.    :bann1
  456.  
  457.    echo SNUUPM: %snu_org%>%snu_file%
  458.    if "%debug%"=="" goto no_dbg8
  459.    if "%editor%"=="" goto no_dbg8
  460.    if exist %editor% %editor% %snu_file%
  461.    :no_dbg8
  462.    set snu_file=
  463.  
  464.  
  465.    rem ----SPOOL DIRs-----------------------------------------------
  466.    echo Making the spool directories for the mailserver
  467.    if not exist %sndrive%\usr\spool\%snu_mserv%\nul md %sndrive%\usr\spool\%snu_mserv%>%nul%
  468.    if not exist %sndrive%\usr\spool\%snu_mserv%\c\nul md %sndrive%\usr\spool\%snu_mserv%\c>%nul%
  469.    if not exist %sndrive%\usr\spool\%snu_mserv%\d\nul md %sndrive%\usr\spool\%snu_mserv%\d>%nul%
  470.    if not exist %sndrive%\usr\spool\%snu_mserv%\x\nul md %sndrive%\usr\spool\%snu_mserv%\x>%nul%
  471.  
  472.  
  473.    rem ----MODEM.MDM-----------------------------------------------
  474.    set snu_file=%sndrive%\etc\uupc\modem
  475.    echo Creating the modem file
  476.  
  477.    if not exist %snu_file%.mdm goto modm3
  478.    echo %tab% Copying the existing %snu_file%.mdm into %snu_file%.BAK
  479.    if exist %snu_file%.bak del %snu_file%.bak>%nul%
  480.    copy %snu_file%.mdm %snu_file%.bak>%nul%
  481.    del %snu_file%.mdm
  482.    :modm3
  483.  
  484.    copy %tmp%\mdm\%snu_mdm%.mdm %snu_file%.mdm>%nul%
  485.    if "%editor%"=="" goto modm1
  486.    if not exist %editor% goto modm1
  487.    echo You might have to edit the file %sndrive%\etc\uupc\modem.mdm to ensure
  488.    echo that the correct COM port is being used, that the DIALPREFIX (ATDP or
  489.    echo ATDT) is set for pulse or tone dialing, and that the INSPEED value
  490.    echo is set correctly. I will try to invoke your favourite editor if you
  491.    echo will press any key for me.........
  492.    pause>%nul%
  493.    %editor% %sndrive%\etc\uupc\modem.mdm
  494.    goto modm2
  495.    
  496.    :modm1
  497.    echo %tab% +-----------------------------------------------------
  498.    echo %tab% ! Edit the file %sndrive%\etc\uupc\modem.mdm in order
  499.    echo %tab% ! to check that the correct COM port is being used
  500.    echo %tab% ! and that the INSPEED value is set correctly.
  501.    echo %tab% +-----------------------------------------------------
  502.    echo Press a key to continue
  503.    pause>%nul%
  504.  
  505.    :modm2
  506.  
  507.  
  508.    rem ----PMAIL-----------------------------------------------
  509.    echo Installing the PMAIL programs
  510.    rem  %snu_p2% is the path %sndrive%\usr\lib\snuupm
  511.    rem
  512.    if exist %snu_p2%\pmail.exe del %snu_p2%\pmail.exe>%nul%
  513.    if exist %snu_p2%\pegasus.rsc del %snu_p2%\pegasus.rsc>%nul%
  514.    if exist %snu_p2%\common.pmd del %snu_p2%\common.pmd>%nul%
  515.    if exist %snu_p2%\pmdict3.pmd del %snu_p2%\pmdict3.pmd>%nul%
  516.    pkunzip %snu_fpm% %snu_p2% pmail.exe pegasus.rsc common.pmd pmdict3.pmd>%nul%
  517.    if not errorlevel 0 goto pmail1
  518.    goto pmail2
  519.    :pmail1
  520.    echo.
  521.    echo.
  522.    echo Some files have failed to unzip. Maybe this is because you are using
  523.    echo a version of pkunzip earlier than 2.04g.
  524.    echo.
  525.    pause
  526.    :pmail2
  527.  
  528.  
  529.    rem ----DOUGMENU-----------------------------------------------
  530.    echo Installing DOUGMENU.EXE
  531.    rem  %snu_p2% is the path %sndrive%\usr\lib\snuupm
  532.    rem
  533.    if exist %snu_p2%\dougmenu.exe del %snu_p2%\dougmenu.exe>%nul%
  534.    pkunzip %snu_fdm% %snu_p2% dougmenu.exe>%nul%
  535.    if not errorlevel 0 goto dmen1
  536.    goto dmen2
  537.    :dmen1
  538.    echo.
  539.    echo.
  540.    echo Some files have failed to unzip. Maybe this is because you are using
  541.    echo a version of pkunzip earlier than 2.04g.
  542.    echo.
  543.    pause
  544.    :dmen2
  545.  
  546.  
  547. ;-------------------------------------------------------
  548. ; SNEWS
  549. ; Not installed if %snu_full% is unset
  550. ;-------------------------------------------------------
  551.  
  552.    rem
  553.    rem  %snu_p2% is the path %sndrive%\usr\lib\snuupm
  554.    rem  %snu_fsn% is the filename of the .ZIP file containing the
  555.    rem            SNEWS executables.
  556.    rem  %snu_snfil% is the list of files specific to SNEWS in SNUUPM.ZIP
  557.    rem  %snu_fd3% is the UUPC .ZIP file containing RNEWS.EXE
  558.    rem
  559.    if exist %snu_p2%\addgroup.exe del %snu_p2%\addgroup.exe>%nul%
  560.    if exist %snu_p2%\compress.exe del %snu_p2%\compress.exe>%nul%
  561.    if exist %snu_p2%\expire.exe del %snu_p2%\expire.exe>%nul%
  562.    if exist %snu_p2%\rmgroup.exe del %snu_p2%\rmgroup.exe>%nul%
  563.    if exist %snu_p2%\snews.exe del %snu_p2%\snews.exe>%nul%
  564.    if exist %snu_p2%\unbatch.exe del %snu_p2%\unbatch.exe>%nul%
  565.  
  566.    if exist %snu_p2%\rnews.exe del %snu_p2%\rnews.exe>%nul%
  567.  
  568. #if %snu_full%
  569.    echo Installing the SNEWS programs
  570.  
  571.    pkunzip %snu_fsn% %snu_p2% addgroup.exe compress.exe expire.exe rmgroup.exe snews.exe unbatch.exe>%nul%
  572.    if not errorlevel 0 goto snews1
  573.  
  574.    pkunzip %snu_fd3% %snu_p2% rnews.exe>%nul%
  575.    if not errorlevel 0 goto snews1
  576.  
  577.    echo Creating a few news groups.
  578.    if exist %snu_p2%\active.bak del %snu_p2%\active.bak>%nul%
  579.    if exist %snu_p2%\active.bat ren %snu_p2%\active.bat active.bak>%nul%
  580.    pkunzip -o -d snuupm.zip %sndrive%\ @%snu_snfil%>%nul%
  581.    if "%editor%"=="" goto snews3
  582.    if not exist %editor% goto snews3
  583.    echo Would you like to edit the ACTIVE.BAT file before the newsgroups
  584.    askenv are created on your PC? [n] /l
  585.    if not "%askenv%"=="y" goto snews3
  586.    %editor% %sndrive%\usr\lib\snuupm\active.bat
  587.  
  588.    :snews3
  589.    call %sndrive%\usr\lib\snuupm\active
  590.    goto snews2
  591.  
  592.    :snews1
  593.    echo.
  594.    echo.
  595.    echo Some files have failed to unzip. Maybe this is because you are using
  596.    echo a version of pkunzip earlier than 2.04g.
  597.    echo.
  598.    pause
  599.    :snews2
  600.  
  601. #else
  602.    echo SNEWS is not installed
  603. #endif
  604.  
  605.    echo +--------------------------------------------------------------+
  606.    echo ! End of installation. Press a key to go back to the Main Menu !
  607.    echo +--------------------------------------------------------------+
  608.    pause>%nul%
  609.  
  610. If you have PKLITE.EXE
  611. Compress the Executables
  612.    
  613.    set snu_pkf1=mail.exe
  614.    for %%f in ( %snu_pkf1% ) do if exist %snu_p2%\%%f pklite %snu_p2%\%%f
  615.  
  616.    set snu_pkf1=rmail.exe
  617.    for %%f in ( %snu_pkf1% ) do if exist %snu_p2%\%%f pklite %snu_p2%\%%f
  618.  
  619.    set snu_pkf1=uucico.exe
  620.    for %%f in ( %snu_pkf1% ) do if exist %snu_p2%\%%f pklite %snu_p2%\%%f
  621.  
  622.    set snu_pkf1=uucp.exe
  623.    for %%f in ( %snu_pkf1% ) do if exist %snu_p2%\%%f pklite %snu_p2%\%%f
  624.  
  625.    set snu_pkf1=uustat.com
  626.    for %%f in ( %snu_pkf1% ) do if exist %snu_p2%\%%f pklite %snu_p2%\%%f
  627.  
  628.    set snu_pkf1=uux.com
  629.    for %%f in ( %snu_pkf1% ) do if exist %snu_p2%\%%f pklite %snu_p2%\%%f
  630.  
  631.    set snu_pkf1=uuxqt.exe
  632.    for %%f in ( %snu_pkf1% ) do if exist %snu_p2%\%%f pklite %snu_p2%\%%f
  633.  
  634.    rem
  635.    rem  Ignore the news files if SNEWS is not installed.
  636.    rem
  637.  
  638.    if "%snu_full%"=="" goto pklite1
  639.  
  640.    set snu_pkf1=addgroup.exe
  641.    for %%f in ( %snu_pkf1% ) do if exist %snu_p2%\%%f pklite %snu_p2%\%%f
  642.  
  643.    set snu_pkf1=compress.exe
  644.    for %%f in ( %snu_pkf1% ) do if exist %snu_p2%\%%f pklite %snu_p2%\%%f
  645.  
  646.    set snu_pkf1=expire.exe
  647.    for %%f in ( %snu_pkf1% ) do if exist %snu_p2%\%%f pklite %snu_p2%\%%f
  648.  
  649.    set snu_pkf1=rmgroup.exe
  650.    for %%f in ( %snu_pkf1% ) do if exist %snu_p2%\%%f pklite %snu_p2%\%%f
  651.  
  652.    set snu_pkf1=rnews.exe
  653.    for %%f in ( %snu_pkf1% ) do if exist %snu_p2%\%%f pklite %snu_p2%\%%f
  654.  
  655.    set snu_pkf1=snews.exe
  656.    for %%f in ( %snu_pkf1% ) do if exist %snu_p2%\%%f pklite %snu_p2%\%%f
  657.  
  658.    set snu_pkf1=unbatch.exe
  659.    for %%f in ( %snu_pkf1% ) do if exist %snu_p2%\%%f pklite %snu_p2%\%%f
  660.  
  661.    :pklite1
  662.    set snu_pkf1=
  663.  
  664.  
  665.  
  666. ;---------------------------------------------------------------------
  667. ;  Configure this PC
  668. ;---------------------------------------------------------------------
  669. %System Setup (<esc> returns),20,11
  670.  
  671. Name of this PC
  672.    #ask thissys,Name of this system (less than 8 characters) [%snu_host%],,,
  673.    set snu_tmp=%thissys%
  674.    if not "%snu_tmp%"=="" set snu_host=%thissys%
  675.  
  676. Domain that this PC belongs to
  677.    #ask thisdom,Domain without leading dot (eg 'ru.ac.za') [%snu_dom%]
  678.    set snu_tmp=%thisdom%
  679.    if not "%snu_tmp%"=="" set snu_dom=%thisdom%
  680.  
  681. Name of the Mail Server
  682.    #ask thismx,MailServer to which you dial (eg 'kudu') [%snu_mserv%]
  683.    set snu_tmp=%thismx%
  684.    if not "%snu_tmp%"=="" set snu_mserv=%thismx%
  685.  
  686. Telephone Number of the Mail Server
  687.    #ask thisMXphone,Enter the telephone number [%snu_phone%]
  688.    set snu_tmp=%thisMXphone%
  689.    if not "%snu_tmp%"=="" set snu_phone=%thisMXphone%
  690.  
  691. Login/userid for this computer on the Mail Server
  692.    #ask thisLogin,Enter the login/userid on the mailhost [%snu_login%]
  693.    set snu_tmp=%thisLogin%
  694.    if not "%snu_tmp"=="" set snu_login=%thisLogin%
  695.  
  696. Password on the Mail Server
  697.    #ask thispassword,Password this system uses on the Mailserver [%snu_passwd%]
  698.    set snu_tmp=%thispassword%
  699.    if not "%snu_tmp%"=="" set snu_passwd=%thispassword%
  700.  
  701. Organization that owns this PC
  702.    #ask thisorg,Organization [%snu_org%],,,
  703.    set snu_tmp=%thisorg%
  704.    if not "%snu_tmp%"=="" set snu_org=%thisorg%
  705.  
  706. Modem (select SAMPLE to configure your own)
  707.    :get_mdm
  708.    echo.
  709.    echo Choose a modem configuration file from one of these. You might have
  710.    echo to edit this file (as %sndrive%\etc\uupc\modem.mdm) once the installation
  711.    echo is complete.
  712.    dir %tmp%\mdm\*.mdm | sort | more
  713.    askenv Which .MDM file do you want -------- /l
  714.    if "%askenv%"=="" goto no_mdm
  715.    if exist %tmp%\mdm\%askenv%.mdm goto got_mdm
  716.    echo You have made a mistake - try again.
  717.    echo Type only the stem of the modem filename, do not type the full path
  718.    echo and do not type the trailing .MDM
  719.    pause
  720.    goto get_mdm
  721.    :got_mdm
  722.    set snu_mdm=%askenv%
  723.    :no_mdm
  724.  
  725. Baud Rate (PC-to-Modem)
  726.    #ask baud,Baud rate between the PC and the Modem [%snu_baud%],,,
  727.       "57,600"=57600
  728.       "38,400"=38400
  729.       "19,200"=19200
  730.       " 9,600"=9600
  731.       " 4,800"=4800
  732.       " 2,400"=2400
  733.       " 1,200"=1200
  734.    set snu_tmp=%baud%
  735.    if not "%snu_tmp%"=="" set snu_baud=%baud%
  736.  
  737. kudu.ru.ac.za
  738. Kudu's Phone Number
  739.    #display,255,255
  740.    "Kudu's telephone number is 311081 in Grahamstown, South Africa"
  741.    ""
  742.    "From within Grahamstown........ 311081"
  743.    "From within South Africa... 0461311081"
  744.    "Internationally.......... +27461311081"
  745. ;----ends-----------------------------------------------------------
  746.