set quiet
mkdir -p dsk
attach RQ0 -iy dsk/rsx11.dsk
echo ************************************************************************
set ENV -p "DECnet Name" SCSNODE=RSXRTR
set ENV -p "DECnet Area" AREA=1
set ENV -p "DECnet Node" NODE=46
echo ************************************************************************
set ENV -p "Central VAX DECnet Node Name" CENTRALNAME=795VAX
echo Central VAX DECnet Area >%AREA%<
set ENV -p "Central VAX DECnet Node" CENTRALNODE=795
echo ************************************************************************
set ENV -p "Remote PDP-11 DECnet Node Name" REMOTENAME=RSTS10
echo Central VAX DECnet Area >%AREA%<
set ENV -p "Remote PDP-11 DECnet Node" REMOTENODE=11
set console log=install.log
echo ************************************************************************
set TQ0 lock
attach TQ0 -er dist/BB-J0830-01.M01.tap
:BRU
noexpect
expect "Enter first device: " send "mu:\r"; continue
expect "Enter second device: " send "du:\r"; continue
expect "Hit RETURN and enter date and time as 'TIM HH:MM MM/DD/YY'" send "\r"; continue
expect "\n>" send "tim %TIME% %DATE_MM%/%DATE_DD%/%DATE_YY%\r"; continue
expect "\n>" send "run bad\r"; continue
expect "\n>" continue
expect "BAD>" send "du0:/list\r"; continue
expect "BAD>" send "\032\r"; continue
expect "\n>" send "run bru\r"; continue
expect "\n>" continue
expect "BRU>" attach TQ0 -er dist/BB-J0830-01.L01.tap ; send "/init/verify/maximum:14629/headers:7314 mu0: du0:\r"; continue
expect "BRU>" send "\032\r"; continue
expect "\n>" goto SYSGEN1
boot TQ0
goto EOS
:SYSGEN1
noexpect
expect ">* Please enter time and date (Default:" send "%TIME% %DATE_DD%-%DATE_MMM%-%DATE_19XX_YYYY%\r"; continue
expect ">* Did you receive your RSX-11M-PLUS distribution kit on magnetic tape? [Y/N]: " send "y\r"; continue
expect ">* Which tape drive contains the distribution tape [S]: " send "mu0:\r"; continue
expect ">* Do you have the 1600-bpi magnetic tape distribution kit? [Y/N]: " send "y\r"; continue
expect ">* Do you need to do manual configuration? [Y/N]: " send "n\r"; continue
expect ">* Is your target system disk an RC25, RK07, or RD52? [Y/N]: " send "n\r"; continue
expect ">* Do you want to verify the second backup set? [Y/N]: " send "y\r"; continue
expect ">@ <EOF>" goto SYSGEN2
boot RQ0
goto EOS
:SYSGEN2
noexpect
expect ">" send "set /uic=[200,200]\r"; continue
expect ">" send "@sysgen\r"; continue
expect "SU010" send -t after=100k "n\r"; continue
expect "SU020" send -t after=100k "n\r"; continue
expect "SU040" send -t after=100k "n\r"; continue
expect "SU060" send -t after=100k "n\r"; continue
expect "SU080" send -t after=100k "n\r"; continue
expect "SU090" send -t after=100k "du0:\r"; continue
expect "SU100" send -t after=100k "y\r"; continue
expect "SU110" send -t after=100k "y\r"; continue
expect "SU120" send -t after=100k "y\r"; continue
expect ">* Comment [S R:0.-55.]: " send "\r"; continue
expect "CE010" send -t after=100k "11/94\r"; continue
expect "CE020" send -t after=100k "y\r"; continue
expect "CE115" send -t after=100k "y\r"; continue
expect "CE120" send -t after=100k "y\r"; continue
expect "CE130" send -t after=100k "%SCSNODE%\r"; continue
expect "CE215" send -t after=100k "y\r"; continue
expect "CE264" send -t after=100k "n\r"; continue
expect "CE270" send -t after=100k "y\r"; continue
expect "CE280" send -t after=100k "\r"; continue
expect "CE290" send -t after=100k "mu0:\r"; continue
expect "CE300" send -t after=100k "2\r"; continue
expect "CE310" send -t after=100k "2044\r"; continue
expect "CE315" send -t after=100k "n\r"; continue
expect "CE320" send -t after=100k "y\r"; continue
expect "CE330" send -t after=100k "n\r"; continue
expect "CE350" send -t after=100k "n\r"; continue
expect ">* Comment [S R:0.-55.]: " send "\r"; continue
expect "CP0604" send -t after=100k "0\r"; continue
expect "CP2204" send -t after=100k "0\r"; continue
expect "CP2404" send -t after=100k "0\r"; continue
expect "CP2604" send -t after=100k "0\r"; continue
expect "CP2804" send -t after=100k "0\r"; continue
expect "CP3004" send -t after=100k "1\r"; continue
expect "CP3008" send -t after=100k "1\r"; continue
expect "CP3036" send -t after=100k "0\r"; continue
expect "CP3068" send -t after=100k "154\r"; continue
expect "CP3072" send -t after=100k "172150\r"; continue
expect "CP3404" send -t after=100k "1\r"; continue
expect "CP3436" send -t after=100k "0\r"; continue
expect "CP3468" send -t after=100k "260\r"; continue
expect "CP3472" send -t after=100k "174500\r"; continue
expect "CP4004" send -t after=100k "0\r"; continue
expect "CP4204" send -t after=100k "0\r"; continue
expect "CP4404" send -t after=100k "0\r"; continue
expect "CP4604" send -t after=100k "0\r"; continue
expect "CP4804" send -t after=100k "0\r"; continue
expect "CP5004" send -t after=100k "0\r"; continue
expect "CP5204" send -t after=100k "1\r"; continue
expect "CP5268" send -t after=100k "300\r"; continue
expect "CP5272" send -t after=100k "176500\r"; continue
expect "CP5276" send -t after=100k "2\r"; continue
expect "CP5404" send -t after=100k "1\r"; continue
expect "CP5408" send -t after=100k "60\r"; continue
expect "CP5468" send -t after=100k "\r"; continue
expect "CP5472" send -t after=100k "\r"; continue
expect "CP5480" send -t after=100k "lp04\r"; continue
expect "CP5484" send -t after=100k "y\r"; continue
expect "CP5604" send -t after=100k "0\r"; continue
expect "CP5804" send -t after=100k "0\r"; continue
expect "CP6004" send -t after=100k "0\r"; continue
expect "CP6204" send -t after=100k "0\r"; continue
expect "CP6804" send -t after=100k "6\r"; continue
expect "CP6820" send -t after=100k "y\r"; continue
expect "CP6832" send -t after=100k "vt100\r"; continue
expect "CP6868" send -t after=100k "310\r"; continue
expect "CP6872" send -t after=100k "176510\r"; continue
expect "CP6832" send -t after=100k "vt100\r"; continue
expect "CP6868" send -t after=100k "320\r"; continue
expect "CP6872" send -t after=100k "176520\r"; continue
expect "CP6832" send -t after=100k "vt100\r"; continue
expect "CP6868" send -t after=100k "330\r"; continue
expect "CP6872" send -t after=100k "176530\r"; continue
expect "CP6832" send -t after=100k "vt100\r"; continue
expect "CP6868" send -t after=100k "340\r"; continue
expect "CP6872" send -t after=100k "176540\r"; continue
expect "CP6832" send -t after=100k "vt100\r"; continue
expect "CP6868" send -t after=100k "350\r"; continue
expect "CP6872" send -t after=100k "176550\r"; continue
expect "CP6832" send -t after=100k "vt100\r"; continue
expect "CP6868" send -t after=100k "360\r"; continue
expect "CP6872" send -t after=100k "176560\r"; continue
expect "CP6832" send -t after=100k "vt100\r"; continue
expect "CP7004" send -t after=100k "0\r"; continue
expect "CP7104" send -t after=100k "0\r"; continue
expect "CP7204" send -t after=100k "0\r"; continue
expect "CP7404" send -t after=100k "0\r"; continue
expect "CP7604" send -t after=100k "n\r"; continue
expect "CP9604" send -t after=100k "\r"; continue
expect "CP9632" send -t after=100k "514\r"; continue
expect "AE010" send -t after=100k "n\r"; continue
expect "AE030" send -t after=100k "n\r"; continue
expect "BE030" send -t after=100k "n\r"; continue
expect "BP040" send -t after=100k "n\r"; continue
expect "BN010" send -t after=100k "y\r"; continue
expect ">* Comment [S R:0.-55.]: " send "\r"; continue
expect "BN012" send -t after=100k "y\r"; continue
expect "BN020" send -t after=100k "all\r"; continue
expect "BN020" send -t after=100k "\r"; continue
expect "BN030" send -t after=100k "n\r"; continue
expect "BN050" send -t after=100k "n\r"; continue
expect ">@ <EOF>" goto SYSGEN3
goto EOS
:SYSGEN3
noexpect
expect ">" send "boo du0:[1,54]\r"; continue
expect "XDT>" send "G"; continue
expect ">" send "tim %TIME% %DATE_MM%/%DATE_DD%/%DATE_YY%\r"; continue
expect ">" send "sav\r"; continue
expect ">* Please enter time and date " send -t after=250k "\032"; continue
expect ">@ <EOF>" goto SYSGEN4
goto EOS
:SYSGEN4
noexpect
expect ">" send "sav/wb\r"; continue
expect ">* Please enter time and date " send -t after=250k "\r"; continue
expect ">@ <EOF>" goto SYSGEN5
goto EOS
:SYSGEN5
noexpect
expect ">" send "bye\r"; continue
expect ">" send "log system\r"; send -t after=500k "system\r"; continue
expect "Welcome to RSX-11M-PLUS" goto SYSGEN6
goto EOS
:SYSGEN6
noexpect
expect ">" send "ins $bad\r"; continue
expect ">" send "ins $edt\r"; goto SYSGEN7
goto EOS
:SYSGEN7
noexpect
expect ">" send "edt [1,2]startup.cmd\r"; continue
expect "*" send "replace 144 ;\tINS LB:[1,1]DAPRES.TSK/RON=YES/PAR=GEN\r"; continue
expect "*" send "replace 149 ;\tINS LB:[3,54]RMSDES.TSK\r"; continue
expect "*" send "replace 150 ;\tINS LB:[3,54]RMSDEF.TSK\r"; continue
expect "*" send "replace 151 ;\tINS LB:[3,54]RMSBCK.TSK\r"; continue
expect "*" send "replace 152 ;\tINS LB:[3,54]RMSRST.TSK\r"; continue
expect "*" send "replace 153 ;\tINS LB:[3,54]RMSCNV.TSK\r"; continue
expect "*" send "replace 154 ;\tINS LB:[3,54]RMSIFL.TSK\r"; continue
expect "*" send "replace 155 ;\tINS LB:[3,54]RMSDSP.TSK\r"; continue
expect "*" send -t delay=100k "insert 157\r.; Install and start DECnet-RSX\r\r\t.SETT $CEX\r\t.SETT $DEC\r\t.SETT $LAT\r\t.SETT $NNS\r\tASN DU0:=XX:\r\tSET /NETUIC=[5,54]\r\t@SY:[5,1]NETINS.CMD\r\r\032"; continue
expect "*" send "exit\r"; continue
expect ">" send "ins $bru\r"; continue
expect ">" send "ufd du0:[137,10]\r"; continue
expect ">" send "all mu0:\r"; continue
expect ">" attach TQ0 -er dist/BB-J5670-01.J01.tap; send "mou/for mu0:\r"; continue
expect ">" send "bru/rew/noini/ver mu0: du0:\r"; continue
expect ">" send "dmo mu0:\r"; continue
expect ">" send "dea mu0:\r"; continue
expect ">" send "set /uic=[137,10]\r"; continue
expect ">" send "@pregen\r"; goto PREGEN
goto EOS
:PREGEN
noexpect
expect "01.00" send -t after=100k "n\r"; continue
expect "04.00" attach TQ0 -er dist/BB-J5670-01.J01.tap;  send -t after=100k "mu0:\r"; continue
expect "04.01" send -t after=100k "y\r"; continue
expect "04.02" send -t after=100k "y\r"; continue
expect "05.00" send -t after=100k "du0:\r"; continue
expect "05.01" send -t after=100k "y\r"; continue
expect "03.00" send -t after=100k "y\r"; continue
expect "04.00" attach TQ0 -er dist/BB-J5670-01.J01.tap;  send -t after=100k "mu0:\r"; continue
expect "04.01" send -t after=100k "y\r"; continue
expect "04.02" send -t after=100k "y\r"; continue
expect "03.00" send -t after=100k "n\r"; continue
expect ">@ <EOF>" goto NETGEN0
goto EOS
:NETGEN0
noexpect
expect ">" send "@netgen\r"; continue
expect "<EOS>" send -t after=100k "\r"; goto NETGEN1
goto EOS
:NETGEN1
noexpect
expect "01.00" send -t after=100k "n\r"; continue
expect "02.00" send -t after=100k "sy:\r"; continue
expect "03.00" send -t after=100k "\r"; continue
expect "04.00" send -t after=100k "\r"; continue
expect "07.00" send -t after=100k "\r"; continue
expect "08.00" send -t after=100k "n\r"; continue
expect "09.00" send -t after=100k "n\r"; continue
expect "10.00" send -t after=100k "y\r"; continue
expect "11.00" send -t after=100k "y\r"; continue
expect "<EOS>" send -t after=100k "\r"; goto NETGEN2
goto EOS
:NETGEN2
noexpect
expect "02.00" send -t after=100k "\r"; continue
expect "04.00" send -t after=100k "\r"; continue
expect "05.00" send -t after=100k "y\r"; continue
expect "<EOS>" send -t after=100k "\r"; goto NETGEN3
goto EOS
:NETGEN3
noexpect
expect "01.00" send -t after=100k "dmc\r"; continue
expect "02.00" send -t after=100k "2\r"; continue
expect "02.01" send -t after=100k "y\r"; continue
expect "02.02" send -t after=100k "5\r"; continue
expect "02.03" send -t after=100k "y\r"; continue
expect "02.04" send -t after=100k "56000\r"; continue
expect "02.05" send -t after=100k "y\r"; continue
expect "03.01" send -t after=100k "160120\r"; continue
expect "03.02" send -t after=100k "420\r"; continue
expect "04.07" send -t after=100k "y\r"; continue
expect "03.01" send -t after=100k "160130\r"; continue
expect "03.02" send -t after=100k "430\r"; continue
expect "04.07" send -t after=100k "y\r"; continue
expect "01.00" send -t after=100k "kdp\r"; continue
expect "02.00" send -t after=100k "1\r"; continue
expect "02.03" send -t after=100k "y\r"; continue
expect "02.04" send -t after=100k "9600\r"; continue
expect "02.05" send -t after=100k "y\r"; continue
expect "03.00" send -t after=100k "3\r"; continue
expect "03.01" send -t after=100k "160200\r"; continue
expect "03.02" send -t after=100k "460\r"; continue
expect "03.03" send -t after=100k "5\r"; continue
expect "04.03" send -t after=100k "160050\r"; continue
expect "04.07" send -t after=100k "y\r"; continue
expect "05.00" send -t after=100k "n\r"; continue
expect "04.03" send -t after=100k "160060\r"; continue
expect "04.07" send -t after=100k "n\r"; continue
expect "05.00" send -t after=100k "n\r"; continue
expect "04.03" send -t after=100k "160070\r"; continue
expect "04.07" send -t after=100k "n\r"; continue
expect "05.00" send -t after=100k "n\r"; continue
expect "01.00" send -t after=100k "kdz\r"; continue
expect "02.00" send -t after=100k "1\r"; continue
expect "02.03" send -t after=100k "y\r"; continue
expect "02.04" send -t after=100k "9600\r"; continue
expect "02.05" send -t after=100k "y\r"; continue
expect "03.00" send -t after=100k "16\r"; continue
expect "03.01" send -t after=100k "160210\r"; continue
expect "03.02" send -t after=100k "500\r"; continue
expect "03.03" send -t after=100k "5\r"; continue
expect "04.03" send -t after=100k "160150\r"; continue
expect "04.05" send -t after=100k "y\r"; continue
expect "04.06" send -t after=100k "y\r"; continue
expect "04.07" send -t after=100k "y\r"; continue
expect "05.00" send -t after=100k "n\r"; continue
expect "04.05" send -t after=100k "y\r"; continue
expect "04.06" send -t after=100k "y\r"; continue
expect "04.07" send -t after=100k "y\r"; continue
expect "05.00" send -t after=100k "n\r"; continue
expect "04.05" send -t after=100k "y\r"; continue
expect "04.06" send -t after=100k "y\r"; continue
expect "04.07" send -t after=100k "y\r"; continue
expect "05.00" send -t after=100k "n\r"; continue
expect "04.05" send -t after=100k "y\r"; continue
expect "04.06" send -t after=100k "y\r"; continue
expect "04.07" send -t after=100k "y\r"; continue
expect "05.00" send -t after=100k "n\r"; continue
expect "04.05" send -t after=100k "y\r"; continue
expect "04.06" send -t after=100k "y\r"; continue
expect "04.07" send -t after=100k "y\r"; continue
expect "05.00" send -t after=100k "n\r"; continue
expect "04.05" send -t after=100k "y\r"; continue
expect "04.06" send -t after=100k "y\r"; continue
expect "04.07" send -t after=100k "y\r"; continue
expect "05.00" send -t after=100k "n\r"; continue
expect "04.05" send -t after=100k "y\r"; continue
expect "04.06" send -t after=100k "y\r"; continue
expect "04.07" send -t after=100k "y\r"; continue
expect "05.00" send -t after=100k "n\r"; continue
expect "04.05" send -t after=100k "y\r"; continue
expect "04.06" send -t after=100k "y\r"; continue
expect "04.07" send -t after=100k "y\r"; continue
expect "05.00" send -t after=100k "n\r"; continue
expect "04.03" send -t after=100k "160160\r"; continue
expect "04.05" send -t after=100k "y\r"; continue
expect "04.06" send -t after=100k "y\r"; continue
expect "04.07" send -t after=100k "y\r"; continue
expect "05.00" send -t after=100k "n\r"; continue
expect "04.05" send -t after=100k "y\r"; continue
expect "04.06" send -t after=100k "y\r"; continue
expect "04.07" send -t after=100k "y\r"; continue
expect "05.00" send -t after=100k "n\r"; continue
expect "04.05" send -t after=100k "y\r"; continue
expect "04.06" send -t after=100k "y\r"; continue
expect "04.07" send -t after=100k "y\r"; continue
expect "05.00" send -t after=100k "n\r"; continue
expect "04.05" send -t after=100k "y\r"; continue
expect "04.06" send -t after=100k "y\r"; continue
expect "04.07" send -t after=100k "y\r"; continue
expect "05.00" send -t after=100k "n\r"; continue
expect "04.05" send -t after=100k "y\r"; continue
expect "04.06" send -t after=100k "y\r"; continue
expect "04.07" send -t after=100k "y\r"; continue
expect "05.00" send -t after=100k "n\r"; continue
expect "04.05" send -t after=100k "y\r"; continue
expect "04.06" send -t after=100k "y\r"; continue
expect "04.07" send -t after=100k "y\r"; continue
expect "05.00" send -t after=100k "n\r"; continue
expect "04.05" send -t after=100k "y\r"; continue
expect "04.06" send -t after=100k "y\r"; continue
expect "04.07" send -t after=100k "y\r"; continue
expect "05.00" send -t after=100k "n\r"; continue
expect "04.05" send -t after=100k "y\r"; continue
expect "04.06" send -t after=100k "y\r"; continue
expect "04.07" send -t after=100k "y\r"; continue
expect "05.00" send -t after=100k "n\r"; continue
expect "01.00" send -t after=100k "\r"; continue
expect "<EOS>" send -t after=100k "\r"; goto NETGEN4
goto EOS
:NETGEN4
noexpect
expect "03.00" send -t after=100k "y\r"; continue
expect "<EOS>" send -t after=100k "\r"; goto NETGEN5
goto EOS
:NETGEN5
noexpect
expect "05.01" send -t after=100k "6\r"; continue
expect "<EOS>" send -t after=100k "\r"; goto NETGEN6
goto EOS
:NETGEN6
noexpect
expect "<EOS>" send -t after=100k "\r"; goto NETGEN7A
goto EOS
:NETGEN7A
noexpect
expect "01.00" send -t after=100k "%SCSNODE%\r"; continue
expect "02.00" send -t after=100k "%AREA%.%NODE%\r"; continue
expect "03.00" send -t after=100k "RSX-11/M+ v4.6 DECnet Router\r"; continue
expect "04.00" send -t after=100k "y\r"; continue
expect "04.01" send -t after=100k "n\r"; continue
expect "05.00" send -t after=100k "1023\r"; continue
expect "07.00" send -t after=100k "%CENTRALNAME%\r"; continue
expect "07.01" send -t after=100k "%AREA%.%CENTRALNODE%\r"; continue
expect "07.00" send -t after=100k "%REMOTENAME%\r"; continue
expect "07.01" send -t after=100k "%AREA%.%REMOTENODE%\r"; continue
expect "07.00" send -t after=100k "\r"; continue
expect "<EOS>" send -t after=100k "\r"; goto NETGEN7B
goto EOS
:NETGEN7B
noexpect
expect "05.01" send -t after=100k "n\r"; continue
expect "<EOS>" send -t after=100k "\r"; goto NETGEN7C
goto EOS
:NETGEN7C
noexpect
expect "<EOS>" send -t after=100k "\r"; goto NETGEN7D
goto EOS
:NETGEN7D
noexpect
expect "02.00" send -t after=100k "n\r"; continue
expect "<EOS>" send -t after=100k "\r"; goto NETGEN7E
goto EOS
:NETGEN7E
noexpect
expect "04.06" send -t after=100k "3584\r"; continue
expect "05.01" send -t after=100k "y\r"; continue
expect "<EOS>" send -t after=100k "\r"; goto NETGEN7F
goto EOS
:NETGEN7F
noexpect
expect "02.01" send -t after=100k "14\r"; continue
expect "03.01" send -t after=100k "16\r"; continue
expect "<EOS>" send -t after=100k "\r"; goto NETGEN8
goto EOS
:NETGEN8
noexpect
expect "02.00" send -t after=100k "1484\r"; continue
expect "<EOS>" send -t after=100k "\r"; goto NETGEN9
goto EOS
:NETGEN9
noexpect
expect "<EOF>" send -t after=100k "\r"; goto SHUTDOWN
goto EOS
:SHUTDOWN
noexpect
expect ">" send -t after=100k "run $shutup\r"; continue
expect "Enter minutes to wait before shutdown: " send -t after=100k "0\r"; continue
expect "Reason for shutdown (<CR> for none):" send -t after=100k "\r"; continue
expect "OK to shutdown? [Y/N]: " send -t after=100k "y\r"; continue
goto EOS
:EOS
continue
:STOP
