$!-----------------------------------------------------------------'f$verify(0) $! UPDATE.COM $! $! WASD VMS Web Services, Copyright (C) 1996-2020 Mark G.Daniel. $! This package (all associated programs), comes with ABSOLUTELY NO WARRANTY. $! This is free software, and you are welcome to redistribute it under the $! conditions of the GNU GENERAL PUBLIC LICENSE, version 3, or later version. $! http://www.gnu.org/licenses/gpl.txt $! $! Update the WASD Web Services Package. $! $ UPDATE_VERSION = "v11.5.1" $! $! 10-DEC-2014 MGD check required privilege $! 06-JUL-2010 MGD bugfix; copy [example]wasd_config_msg.conf $! 07-NOV-2009 MGD v10.0.0, logical naming schema $! 14-SEP-2007 MGD up-case procedure spec to avoid mixed-case issues $! 19-JUL-2007 MGD bugfix; parse of HT_ROOT with rooted logical (Tim Sneddon) $! 13-MAR-2006 MGD v9.1.4, shutdown.com $! 27-NOV-2004 MGD v9.0, new startup, message file $! 23-DEC-2003 MGD IA64 support $! 23-JAN-2003 MGD use subprocess defining HT_ROOT and HT_EXE in case the $! 'update' is not on a "real" WASD site (e.g. SSL update) $! 07-DEC-2002 MGD v8.1, major revision $! 08-JUN-2002 MGD v8.0, new message database $! 03-NOV-2001 MGD v7.2.1, PERSONA_MACRO build $! 08-JUL-2001 MGD v7.2, new startup $! 04-NOV-2000 MGD v7.1, new startup $! 20-MAY-2000 MGD v7.0, new message database $! 30-NOV-1999 MGD v6.1, new message database, $! independant UPDATESSL.COM, $! remove NETLIB support, $! remove SSLeay support $! bugfix; HT_ROOT derived from concealed device $! 18-SEP-1999 MGD OpenSSL 0.9.4 $! 05-MAY-1999 MGD V6.0, new message database, $! OpenSSL (Richard Levitte) distribution $! 14-NOV-1998 MGD v5.3, new server startup procedure $! 03-SEP-1998 MGD v5.2, no change $! 27-JUN-1998 MGD initial, v5.1 (and some would say long overdue!) $!----------------------------------------------------------------------------- $! $ if f$trnlnm("INSTALL$DBUG") .nes. "" then set verify $! $ set noverify $ ss$_abort = 44 $ ss$_bugcheck = 676 $ P1 = f$edit(P1,"upcase") $ P2 = f$edit(P2,"upcase") $ delete = "delete" $ copy = "copy" $ purge = "purge/log" $ say = "write sys$command" $ vms_version = f$integer(f$extract(1,1,f$getsyi("version"))) * 10 +- f$integer(f$extract(3,1,f$getsyi("version"))) $ if vms_version .ge. 72 then set process /parse=traditional $ archName = f$edit(f$getsyi("ARCH_NAME"),"UPCASE") $ if archName .eqs. "ALPHA" then archName = "AXP" $ set control=Y $ on controly then exit ss$_abort $! $ if f$trnlnm("WASD_ROOT","LNM$SYSTEM") .eqs. "" .and. - f$trnlnm("HT_ROOT","LNM$SYSTEM") .eqs. "" $ then $ type sys$input ******************************************* * "WASD_ROOT" LOGICAL NAME NOT DETECTED. * * THIS DOES NOT LOOK LIKE AN UPDATE! * ******************************************* $ exit ss$_abort $ endif $! $ if f$trnlnm("WASD_ROOT","LNM$JOB") .eqs. "" $ then $! (subprocess to do the actual work, define local logicals) $ procCom = f$edit(f$environment("PROCEDURE"),"upcase") $ wasdRoot = f$parse(procCom,,,"DEVICE","NO_CONCEAL") + - f$parse(procCom,,,"DIRECTORY","NO_CONCEAL") - - "][" - ".000000" - "000000." - ".INSTALL]" + ".]" $ define /job /nolog /translation=concealed WASD_ROOT 'wasdRoot' $ wasdExe = "WASD_ROOT:[''archName']" $ define /job /nolog WASD_EXE 'wasdExe' $! (spawn a subprocess to do the actual install ensures job logical deletion) $ set noon $ spawn /wait @'procCom' "''P1'" "''P2'" $ set on $ deassign /job WASD_ROOT $ deassign /job WASD_EXE $ exit $ endif $! $ if f$environment("depth") .le. 2 $ then $ type sys$input WASD VMS Web Services, Copyright (C) 1996-2020 Mark G.Daniel. This package (all associated programs), comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under the conditions of the GNU GENERAL PUBLIC LICENSE, version 3, or any later version. http://www.gnu.org/licenses/gpl.txt $ endif $! $ currentDefault = f$environment("DEFAULT") $! $ type sys$input ****************************************** $ say " * UPDATE WASD VMS Web Services ''UPDATE_VERSION' *" $ type sys$input ****************************************** $ if P1 .nes. "SERVER" .and. P2 .nes. "SERVER" $ then $ type sys$input If the server executable only is required to be updated then restart this procedure with "SERVER" as a parameter. $ endif $ type sys$input All sections making file-system modifications may be individually declined. In this sense the update may be undertaken step-by-step or sections repeated. The first section is COMPILING/LINKING, after which you will be able to quit. In a mixed architecture cluster (including Alpha, Itanium and/or VAX systems) the compile/link section must be done on any required to serve! $ read sys$command response /prompt="Press RETURN to continue: " $ say "" $! $ if .not. f$privilege("SYSPRV") $ then $ type sys$input ***************************** * requires SYSPRV enabled * ***************************** $ exit ss$_abort $ endif $! $ if f$search("wasd_root:[000000]*.*") .eqs. "" $ then $ type sys$input *********************************************************** * APPEARS TO BE A PROBLEM WITH THE "WASD_ROOT" LOGICAL! * *********************************************************** $ exit ss$_abort $ endif $! $!(cleanup any pre 8.1 installation and/or update procedures) $ if f$search("wasd_root:[000000]install%*.com") .nes. "" $ then $ set noon $ delete/nolog/noconfirm wasd_root:[000000]install%*.com;* $ set on $ endif $ if f$search("wasd_root:[000000]update%*.com") .nes. "" $ then $ set noon $ delete/nolog/noconfirm wasd_root:[000000]update%*.com;* $ set on $ endif $! $ if P1 .eqs. "CLEAN" $ then $ @WASD_ROOT:[INSTALL]UPDATE_CLEANUP.COM $ exit $ endif $! *********************** $! * BUILD EXECUTABLES * $! *********************** $! $!(the only parameter that is intended to be passed here is "SSL") $ @WASD_ROOT:[INSTALL]BUILD.COM 'p1' $! $ type sys$input ************************ * SERVER QUICK-CHECK * ************************ This executes the package demonstration procedure, allowing the basic package to be evaluated or checked. You may run this at any time to again check the $ if P1 .eqs. "SSL" $ then type sys$input package for basic functionality using $ @WASD_ROOT:[INSTALL]DEMO.COM SSL $ else type sys$input package for basic functionality using $ @WASD_ROOT:[INSTALL]DEMO.COM $ endif $ response = "" $ read sys$command response /prompt="Execute the demonstration procedure? [NO]: " $ say "" $ if response $ then $ if P1 .eqs. "SSL" $ then @WASD_ROOT:[INSTALL]DEMO.COM SSL $ else @WASD_ROOT:[INSTALL]DEMO.COM $ endif $ endif $! $ if P1 .eqs. "SSL" $ then $! (backward-compatibility in the way SSL used to built) $ type sys$input ********************************** * SSL UPDATE C O M P L E T E * ********************************** $ exit $ endif $! $ if P1 .eqs. "SERVER" $ then $ type sys$input ************************************* * SERVER UPDATE C O M P L E T E * ************************************* $ exit $ endif $! $ type sys$input ********************** * CONTINUE UPDATE? * ********************** $ response = "" $ read sys$command response /prompt="Continue the update? [NO]: " $ say "" $ if .not. response then exit $! $ type sys$input ************************** * CHECK DOCUMENTATION? * ************************** $ response = "" $ read sys$command response /prompt="Check [WASDOC] content? [NO]: " $ say "" $ if response then @WASD_ROOT:[WASDOC]CHECK.COM $! $ if f$search("wasd_root:[axp-bin]*.exe") .eqs. "" .and. - f$search("wasd_root:[cgi-bin]*.com") .eqs. "" .and. - f$search("wasd_root:[log_server]*.log") .eqs. "" .and. - f$search("wasd_root:[vax-bin]*.exe") .eqs. "" $ then $ type sys$input *********************************** * UPDATE PRE-8.0.1 INSTALLATION * *********************************** This looks like a pre-8.0.1 update (no files in [AXP-BIN], [CGI-BIN], [LOG_SERVER] or [VAX-BIN]). If this is not the case then consider carefully whether you should continue with this update. $ response = "NO" $ read sys$command response /prompt="Continue? [NO]: " $ say "" $ if response .eqs. "" then response = "NO" $ if .not. response then exit ss$_abort $ @WASD_ROOT:[INSTALL]SECURE_PRE81_INFO.COM $ endif $! $ if f$search ("WASD_ROOT:[LOCAL]*STARTUP*.COM") .nes. "" $ then $ type sys$input ***************************************** * STARTUP PROCEDURES FOUND IN [LOCAL] * ***************************************** Startup procedures have been found in [LOCAL]. This indicates that this site still has the version 8.0 or earlier structure. These files will be renamed to *.COM_ and should be deleted soon. You will be required to respond YES when asked to "UPDATE TO V8.1 STARTUP PROCEDURES" at the next step. $ response = "YES" $ read sys$command response /prompt="Modify startup procedures now? [YES]: " $ say "" $ if response .eqs. "" then response = "YES" $ if response $ then $ copy = "copy/log" $ copy wasd_root:[local]*startup*.com;0 wasd_root:[local]*.com_;0 $ delete = "delete" $ delete wasd_root:[local]*startup*.com;* $ say "" $ endif $ endif $! $ type sys$input **************************************** * UPDATE TO V10.0 STARTUP PROCEDURES * **************************************** Updating to version 10.0 from any other REQUIRES MODIFIED STARTUP procedures. The new WASD logical naming schema is supported by these procedures. It is STRONGLY recommended they be used! [EXAMPLE]STARTUP.COM to [STARTUP]STARTUP.COM [EXAMPLE]SHUTDOWN.COM to [STARTUP]SHUTDOWN.COM [EXAMPLE]STARTUP_SERVER.COM to [STARTUP]STARTUP_SERVER.COM [EXAMPLE]STARTUP_DECNET.COM to [STARTUP]STARTUP_DECNET.COM [EXAMPLE]WASD_FILE_DEV.COM to [000000]WASD_FILE_DEV.COM If you decline they will be copied as STARTUP*_LATEST.COM instead (good luck!) $ response = "" $ read sys$command response /prompt="Update startup procedures? [NO]: " $ say "" $ copy = "copy/log" $ if response $ then $ copy wasd_root:[example]startup.com wasd_root:[startup] $ copy wasd_root:[example]shutdown.com wasd_root:[startup] $ copy wasd_root:[example]startup_server.com wasd_root:[startup] $ copy wasd_root:[example]startup_decnet.com wasd_root:[startup] $ if f$search("wasd_root:[startup]startup_local.com") .eqs. "" - then copy wasd_root:[example]startup_local.com wasd_root:[startup] $ copy wasd_root:[example]wasd_file_dev.com wasd_root:[000000] $ else $ copy wasd_root:[example]startup.com wasd_root:[startup]startup_latest.com $ copy wasd_root:[example]shutdown.com wasd_root:[startup]shutdown_latest.com $ copy wasd_root:[example]startup_server.com wasd_root:[startup]startup_server_latest.com $ copy wasd_root:[example]startup_decnet.com wasd_root:[startup]startup_decnet_latest.com $ copy wasd_root:[example]startup_local.com wasd_root:[startup]startup_local_latest.com $ copy wasd_root:[example]wasd_file_dev.com wasd_root:[000000]wasd_file_dev_latest.com $ purge = "purge" $ purge wasd_root:[startup]*_latest.com $ endif $ say "" $! $ if f$trnlnm ("HTTPD$MSG") .eqs. "" .and. - f$trnlnm ("WASD_CONFIG_MSG") .eqs. "" $ then $ type sys$input ******************************************** * "HTTPD$MSG" not found and not updated. * * This logical should be defined! * ******************************************** $ else $ type sys$input *************************************** * UPDATE MESSAGE CONFIGURATION FILE * *************************************** This version uses the v9.0/v10.0 WASD_CONFIG_MSG configuration file. If you are currently using less than v9.0 you will need to update. $ response = "" $ read sys$command response /prompt="Update your current version now? [NO]: " $ say "" $ if response $ then $ copy = "copy/log" $ copy wasd_root:[example]wasd_config_msg.conf wasd_root:[local] $ say "" $ endif $ endif $! $ if f$search("wasd_root:[axp-bin]*.exe") .eqs. "" .and. - f$search("wasd_root:[cgi-bin]*.com") .eqs. "" .and. - f$search("wasd_root:[log_server]*.log") .eqs. "" .and. - f$search("wasd_root:[vax-bin]*.exe") .eqs. "" $ then $! (conclude that this is a pre version 8.0.1 update site) $ @WASD_ROOT:[INSTALL]SCRIPTS_ALL.COM $ endif $! $ type sys$input **************************** * UPDATE PACKAGE SCRIPTS * **************************** The procedure WASD_ROOT:[INSTALL]SCRIPTS.COM updates package scripts. It prompts for selected groups of scripts to be installed (perhaps updated) or removed. More information is available when using the procedure. Scripts available with this release of the package will not be available for use by the server until this procedure is performed. You can execute the procedure now or do it later manually. $ response = "" $ read sys$command response /prompt="Execute the procedure now? [NO]: " $ say "" $ if response $ then $ @WASD_ROOT:[INSTALL]SCRIPTS.COM $! 'f$verify(0) $ set default 'currentDefault' $ endif $! $! $ type sys$input ****************************** * REAPPLY SECURITY PROFILE * ****************************** The procedure WASD_ROOT:[INSTALL]SECURE.COM resets a site's file structure and server/scripting accounts to a default installation. It is recommended to reapply these settings periodically to ensure the package-default security environment has not been compromised. This activity is not without potential side-effects however. If changes have been made to cater for specific scripting requirements, etc., these may be rendered non-working. Refer to the "Technical Overview" for more detailed information. You can execute the procedure now or do it at any other time manually. $ response = "" $ read sys$command response /prompt="Execute the procedure now? [NO]: " $ say "" $ if response $ then $ @WASD_ROOT:[INSTALL]SECURE.COM $! 'f$verify(0) $ set default 'currentDefault' $ endif $! $ type sys$input **************************************** * CLEAN UP AFTER PREVIOUS VERSION(S) * **************************************** The procedure WASD_ROOT:[INSTALL]UPDATE_CLEANUP.COM deletes files from previous versions no longer in use and otherwise cleans up after older versions of WASD. (It is generally fairly conservative, but no guarantees.) You can execute the procedure now or do it later manually. $ response = "" $ read sys$command response /prompt="Execute the procedure now? [NO]: " $ say "" $ if response $ then $ @WASD_ROOT:[INSTALL]UPDATE_CLEANUP $! 'f$verify(0) $ set default 'currentDefault' $ endif $! $ type sys$input ********************* * PURGE OLD FILES * ********************* Performs a purge of the WASD_ROOT:[000000] tree, removing replaced versions. You can purge now or do it later manually using PURGE WASD_ROOT:[000000...]. $ response = "" $ read sys$command response /prompt="Purge now? [NO]: " $ say "" $ if response $ then $ purge WASD_ROOT:[000000...] $ say "" $ endif $! $ type sys$input ***************************** * UPDATE C O M P L E T E * ***************************** $!-----------------------------------------------------------------------------