parm entry="main" # HP 3000 Web Starter Kit installation command file # Lars Appel 02.aug.00 / 25.sep.00 / 23.oct.00 if bound(yesno) then deletevar yesno endif if not bound(srcdir) then setvar srcdir "E:\WebKit2" endif if not bound(tmpdir) then setvar tmpdir "/tmp" endif if "!entry" = "setup" then echo parm srcfile, dstfile echo echo set echo=off echo input pcResponse ;prompt="!![chr(27)]*s12345^" echo set echo=on echo echo if lft(pcResponse,3) = "WRQ" then echo echo echo Note: Using bytestream transfer mode and HFS names echo echo echo !![chr(27)]&oG echo echo Option Explicit echo echo Sub Main echo echo On Error GoTo Oops echo echo With Application echo echo .WRQMPEFilenames = rcPOSIX echo echo .WRQMPEStream = True echo echo .WRQRemoveExtension = False echo echo .WRQSendFile "!!srcfile", "!!dstfile", rcBinary, rcAskUser echo echo End With echo echo Application.Transmit "OKAY" + Chr$(rcCR) echo echo Exit Sub echo echo Oops: echo echo Print "File transfer to host FAILED" echo echo Application.Transmit "OOPS" + Chr$(rcCR) echo echo Exit Sub echo echo End Sub echo echo !![chr(27)]&oH echo echo run PCLINK2.PUB.SYS echo echo set echo=off echo input pcResponse echo set echo=on echo echo if pcResponse = "OKAY" then echo echo File !!dstfile has been uploaded echo else echo echo Something went wrong on the PC side?! echo endif echo echo deletevar pcResponse echo echo elseif lft(pcResponse,4) = "MS92" then echo echo echo Note: Using binary transfer mode and HFS names echo echo echo !![chr(27)]&oFBINARY echo echo !![chr(27)]&oFRECSIZE 256 echo echo !![chr(27)]&oFLOCF !!srcfile echo echo !![chr(27)]&oFHOSTF !!dstfile echo echo !![chr(27)]&oCUPLOAD echo echo set echo=off echo input pcResponse echo if lft(pcResponse,3) = "RUN" then echo !!pcResponse echo input pcResponse echo endif echo set echo=on echo echo if pcResponse = "S" then echo echo File !!dstfile has been uploaded echo else echo echo Something went wrong on the PC side?! echo endif echo echo if pcResponse = "S" then echo echo Converting binary file to bytestream format echo echo xeq /bin/mv "-f !!dstfile !!dstfile.fb" echo xeq /bin/tobyte "!!dstfile.fb !!dstfile" echo xeq /bin/rm "!!dstfile.fb" echo endif echo echo deletevar pcResponse echo echo else echo echo echo Please perform a manual file transfer echo echo echo echo Source (PC) = !!srcfile echo echo Destination = !!dstfile echo echo echo echo Press Return when transfer is finished echo echo input pcResponse echo echo deletevar pcResponse echo echo endif return endif xeq !hpfile entry="setup" > filexfer if hpuser="MANAGER" and hpaccount="SYS" then echo Enter source directory on PC (eg E:\WebKit2) input srcdir, "src dir: " echo Enter temp directory on 3000 (eg /tmp) input tmpdir, "tmp dir: " if lft(hprelversion,4)="C.55" then echo Do you wish to fixup the Posix permissions? input yesno, "Yes/No: " if ups(lft(yesno,1))="Y" then if not finfo("!tmpdir/fix55sh", "exists") then echo Uploading command file fix55sh from PC xeq filexfer "!srcdir\upload\fix55sh", "!tmpdir/fix55sh" endif echo Executing fix55sh command file xeq !tmpdir/fix55sh endif deletevar yesno endif echo Do you wish to install the GNU zip utils? input yesno, "Yes/No: " if ups(lft(yesno,1))="Y" then if not finfo("!tmpdir/gnuzip.tar.Z", "exists") then echo Uploading archive file gnuzip.tar.Z from PC xeq filexfer "!srcdir\upload\gnuzip.tar.Z", "!tmpdir/gnuzip.tar.Z" endif echo Unpacking gnuzip.tar.Z archive file xeq /bin/tar "xvzopf !tmpdir/gnuzip.tar.Z" endif deletevar yesno echo Do you wish to install the InfoZIP utils? input yesno, "Yes/No: " if ups(lft(yesno,1))="Y" then if not finfo("!tmpdir/infozip.tar.Z", "exists") then echo Uploading archive file infozip.tar.Z from PC xeq filexfer "!srcdir\upload\infozip.tar.Z", "!tmpdir/infozip.tar.Z" endif echo Unpacking infozip.tar.Z archive file xeq /bin/tar "xvzopf !tmpdir/infozip.tar.Z -C /usr/local/bin" endif deletevar yesno echo Do you wish to install JDK 1.1.7 for MPE/iX? input yesno, "Yes/No: " if ups(lft(yesno,1))="Y" then if not finfo("!tmpdir/jdk117.tar", "exists") then echo Uploading archive file jdk117.tar from PC xeq filexfer "!srcdir\upload\jdk117.tar", "!tmpdir/jdk117.tar" endif echo Unpacking jdk117.tar archive file if finfo("/JAVA/INSTALL/README", "exists") then purge /JAVA/INSTALL/README endif if finfo("/JAVA/INSTALL/JINSTJDK", "exists") then purge /JAVA/INSTALL/JINSTJDK endif xeq /bin/tar "xvopf !tmpdir/jdk117.tar" echo Streaming the JDK installation job stream jinstjdk.install.java echo Waiting for the job to complete pause job=!hplastjob echo Removing the intermediate tar archive purge /JAVA/INSTALL/JDK117B.60.tar.Z endif deletevar yesno echo Do you wish to install JDK 1.2.2 for MPE/iX? input yesno, "Yes/No: " if ups(lft(yesno,1))="Y" then if not finfo("!tmpdir/jdk122.tar", "exists") then echo Uploading archive file jdk122.tar from PC xeq filexfer "!srcdir\upload\jdk122.tar", "!tmpdir/jdk122.tar" endif echo Unpacking jdk122.tar archive file if finfo("/JAVA/INSTALL/README", "exists") then purge /JAVA/INSTALL/README endif if finfo("/JAVA/INSTALL/JINSTJDK", "exists") then purge /JAVA/INSTALL/JINSTJDK endif xeq /bin/tar "xvopf !tmpdir/jdk122.tar" echo Streaming the JDK installation job stream jinstjdk.install.java echo Waiting for the job to complete pause job=!hplastjob echo Removing the intermediate tar archive purge /JAVA/INSTALL/JDK122.60.tar.Z endif deletevar yesno if finfo("/usr/local/java/jdk1.1.7", "exists") then echo Do you wish to patch JDK 1.1.7 to the A.17.03 B level? input yesno, "Yes/No: " if ups(lft(yesno,1))="Y" then if not finfo("!tmpdir/fix117.tar", "exists") then echo Uploading archive file fix117.tar from PC xeq filexfer "!srcdir\upload\fix117.tar", "!tmpdir/fix117.tar" endif echo Unpacking fix117.tar archive file xeq /bin/tar "xvopf !tmpdir/fix117.tar" echo Correcting file permissions to 755 xeq /bin/chmod & "755 /usr/local/java/jdk1.1.7/lib/PA-RISC/green_threads/libjava.sl" xeq /bin/chmod & "755 /usr/local/java/jdk1.1.7/lib/PA-RISC/green_threads/libjava_g.sl" endif deletevar yesno endif # listfile /lib/@.a ,6 > alibs # listfile /usr/lib/@.a ,6 >> alibs # listfile /lib/@.sl ,6 > slibs # listfile /usr/lib/@.sl ,6 >> slibs # if finfo("slibs", "eof") < finfo("alibs", "eof") then echo Do you wish to (re)create the .sl libraries from .a files? input yesno, "Yes/No: " if ups(lft(yesno,1))="Y" then if not finfo("!tmpdir/LIBS.hp3000", "exists") then echo Uploading shell script LIBS.hp3000 from PC xeq filexfer "!srcdir\upload\LIBS.hp3000", "!tmpdir/LIBS.hp3000" endif echo Granting execute permission to script xeq /bin/chmod "u+x !tmpdir/LIBS.hp3000" echo Executing the LIBS.hp3000 shell script xeq /bin/sh "-L -c 'umask 0022; !tmpdir/LIBS.hp3000' " endif deletevar yesno # endif echo Do you wish to install HP JDBC Driver for Image/SQL and Allbase? input yesno, "Yes/No: " if ups(lft(yesno,1))="Y" then if not finfo("!tmpdir/jdbc60.tar", "exists") then echo Uploading archive file jdbc60.tar from PC xeq filexfer "!srcdir\upload\jdbc60.tar", "!tmpdir/jdbc60.tar" endif echo Unpacking jdbc60.tar archive file if not finfo("/SYS/JDBC", "exists") then newgroup jdbc.sys; access=(r,x:any) endif xeq /bin/tar "xvopf !tmpdir/jdbc60.tar" echo Streaming the JDBC installation job stream i00ijdbc.jdbc.sys echo Waiting for the job to complete pause job=!hplastjob endif deletevar yesno echo Creating WEBKIT account and DEMO.WEBKIT user if not finfo("/WEBKIT", "exists") then newacct webkit, demo; pass=secret altacct webkit; cap=+ph altuser demo.webkit; pass=not; cap=+ph endif echo ---------------------------------------------- echo Notice that the passwords are NOT quite SECRET echo However, these are needed by some of the demos echo ---------------------------------------------- echo Preparing !hpfile ACD for phase 2 execution altsec !hpfile; repacd=(r,x:demo.webkit) echo echo --------------------------- echo Please logon as DEMO.WEBKIT and re-execute !hpfile for Phase 2 echo --------------------------- elseif hpuser="DEMO" and hpaccount="WEBKIT" then echo Enter source directory on PC (eg E:\WebKit2) input srcdir, "src dir: " echo Enter temp directory on 3000 (eg /tmp) input tmpdir, "tmp dir: " echo Do you wish to install Apache 1.3.9 and JServ 1.1 now? input yesno, "Yes/No: " if ups(lft(yesno,1))="Y" then setvar myfile "ajs-139-11.tar" if not finfo("!tmpdir/!myfile", "exists") then echo Uploading archive file !myfile.gz from PC xeq filexfer "!srcdir\upload\!myfile.gz", "!tmpdir/!myfile.gz" echo Uncompressing !myfile.gz file xeq /usr/local/bin/gzip "-d !tmpdir/!myfile.gz" endif echo Unpacking !myfile archive file xeq /bin/tar "xvopf !tmpdir/!myfile" deletevar myfile rename ./htdocs/index.html , ./htdocs/apache.html endif deletevar yesno echo Do you wish to add the WebKit demo files now? input yesno, "Yes/No: " if ups(lft(yesno,1))="Y" then setvar myfile "webkit2.tar.Z" if not finfo("!tmpdir/!myfile", "exists") then echo Uploading archive file !myfile from PC xeq filexfer "!srcdir\upload\!myfile", "!tmpdir/!myfile" endif echo Unpacking !myfile archive file xeq /bin/tar "xvzopf !tmpdir/!myfile" deletevar myfile endif deletevar yesno echo Do you wish to adjust the Web Kit config files now? input yesno, "Yes/No: " if ups(lft(yesno,1))="Y" then chdir ./conf setvar myfile "httpd.conf" xeq /bin/patch "-c -i ../diffs/!myfile -o !myfile !myfile.default" setvar myfile "access.conf" copy ./!myfile.default , ./!myfile setvar myfile "srm.conf" copy ./!myfile.default , ./!myfile setvar myfile "magic" copy ./!myfile.default , ./!myfile setvar myfile "mime.types" copy ./!myfile.default , ./!myfile chdir ../etc setvar myfile "jserv.conf" xeq /bin/patch "-c -i ../diffs/!myfile -o !myfile !myfile.default" setvar myfile "jserv.properties" xeq /bin/patch "-c -i ../diffs/!myfile -o !myfile !myfile.default" setvar myfile "zone.properties" xeq /bin/patch "-c -i ../diffs/!myfile -o !myfile !myfile.default" chdir .. xeq /bin/chmod "755 cgi-bin/test-cgi" endif deletevar yesno echo Do you wish to create the MUSIC sample database now? input yesno, "Yes/No: " if ups(lft(yesno,1))="Y" then echo 1> auto echo >> auto echo 3>> auto echo >> auto echo 4>> auto echo >> auto echo 5>> auto echo >> auto echo 0>> auto imsql.sampledb.sys < auto endif deletevar yesno echo Do you wish to copy the JDBC driver to the examples now? input yesno, "Yes/No: " if ups(lft(yesno,1))="Y" then if not finfo("/SYS/JDBC/DRIVERJ", "exists") then echo *** Missing DRIVERJ file in JDBC.SYS group *** else echo Copying allbase.jar archive file to /WEBKIT/PUB/lib copy /SYS/JDBC/DRIVERJ , /WEBKIT/PUB/lib/allbase.jar xeq /bin/chmod "644 /WEBKIT/PUB/lib/allbase.jar" echo Unpacking JDBC driver classes to /WEBKIT/PUB/htdocs/LiveDemo chdir ./htdocs/LiveDemo xeq /bin/tar "xof /SYS/JDBC/DRIVERT com" xeq /bin/chmod "-R 755 com" echo Unpacking JDBC driver classes to /WEBKIT/PUB/servlets chdir ../../servlets xeq /bin/tar "xof /SYS/JDBC/DRIVERT com" xeq /bin/chmod "-R 755 com" chdir .. endif endif deletevar yesno echo Do you wish to add the Sun jsdk.jar file now? input yesno, "Yes/No: " if ups(lft(yesno,1))="Y" then if not finfo("!tmpdir/jsdk.jar", "exists") then echo Enter source filename on PC (eg E:\WebKit2\upload\jsdk.jar) setvar srcfile "E:\WebKit2\upload\jsdk.jar" input srcfile, "src file: " echo Uploading Sun jsdk.jar archive file from PC xeq filexfer "!srcfile", "!tmpdir/jsdk.jar" deletevar srcfile endif echo Copying jsdk.jar archive file to /WEBKIT/PUB/lib xeq /bin/cp "!tmpdir/jsdk.jar /WEBKIT/PUB/lib/jsdk.jar" xeq /bin/chmod "644 /WEBKIT/PUB/lib/jsdk.jar" endif deletevar yesno echo Do you wish to add the Sun swingall.jar file now? input yesno, "Yes/No: " if ups(lft(yesno,1))="Y" then if not finfo("!tmpdir/swingall.jar", "exists") then echo Enter source filename on PC (eg E:\WebKit2\upload\swingall.jar) setvar srcfile "E:\WebKit2\upload\swingall.jar" input srcfile, "src file: " echo Uploading Sun swingall.jar archive file from PC xeq filexfer "!srcfile", "!tmpdir/swingall.jar" deletevar srcfile endif echo Copying swingall.jar archive file to /WEBKIT/PUB/lib xeq /bin/cp "!tmpdir/swingall.jar /WEBKIT/PUB/lib/swingall.jar" xeq /bin/chmod "644 /WEBKIT/PUB/lib/swingall.jar" endif deletevar yesno echo Do you wish to start the server job now? input yesno, "Yes/No: " if ups(lft(yesno,1))="Y" then stream /WEBKIT/PUB/lib/httpd.job setvar job1 hplastjob stream /WEBKIT/PUB/lib/jserv.job setvar job2 hplastjob stream jstrtmon.jdbc.sys pause 3 showjob !job1 showjob !job2 showjob !hplastjob deletevar job1,job2 endif deletevar yesno echo You are now ready to start surfing the Web Starter Kit echo Begin with the URL http://your3k:3001/index.html echo Either use DNS name or IP address for "your3k" above echo echo You an also purge the !hpfile command file now else echo Phase 1 is for MANAGER.SYS only echo Phase 2 is for DEMO.WEBKIT only endif