PARM SCO_ID="", PATCH_TOOL="" setvar unpackp_vuf 'B.00.02' if ('!SCO_ID' = '?') or (ups('!SCO_ID') = 'HELP') then echo UNPACKP.INSTALL.SYS Version !unpackp_vuf echo echo DESCRIPTION: Command file to decode and unpack MPE/iX patches echo downloaded from HP ESC, and move them to the proper echo group and account for the specified patch installation echo tool. echo echo SYNTAX: UNPACKP PATCH_ID, PATCH_TOOL echo echo where: PATCH_ID is the name of the patch to be unpacked. echo echo PATCH_TOOL is the name of installation tool that will echo be used to apply the patch; either 'AUTOPAT' echo or 'PATCHIX'. The default is 'PATCHIX'. echo echo Note: The patch files unpacked by this echo script will be moved to: echo PATCHXL.SYS for 'PATCHIX' echo PATCHXL.TELESUP for 'AUTOPAT' echo echo REQUIREMENTS: echo echo 1) UNPACKP must reside in the INSTALL.SYS group, and be echo be executed by MANAGER.SYS. echo echo 2) The patch name given when invoking the UNPACKP command echo file must be a valid MPE/iX patch id and version (for echo example 'MPEHXB0A') and must exist in INSTALL.SYS. return endif setvar unpackp_jcw fatal # Unpackp has to be executed under MANAGER.SYS,INSTALL because it # does some across account activities which require SM capability. if (HPGROUP <> 'INSTALL') or (HPACCOUNT <> 'SYS') or & (HPUSER <> 'MANAGER') then echo ERROR: UNPACKP must be run by MANAGER.SYS from INSTALL.SYS. return endif if '!SCO_ID' = '' then echo ERROR: Missing patch ID parameter. echo Syntax: UNPACKP patch_id [,patch_tool] return endif # Allow the patch ID to be either 1) MPEKXH0B or 2) ./mpekxh0b (case sensitive) if lft('!SCO_ID', 1) = '/' then echo ERROR: Invalid patch ID parameter. return elseif lft('!SCO_ID', 2) = './' then if pos('/', '!SCO_ID', 2) <> 0 then echo ERROR: Invalid patch ID parameter. return else setvar unpackp_sco_id ups(basename('!SCO_ID')) # Case sensitive: setvar unpackp_sco_fname '!SCO_ID' endif else setvar unpackp_sco_id ups(lft(ltrim('!SCO_ID'),8)) # Shift to uppercase (so frombyte will find it) setvar unpackp_sco_fname ups('!SCO_ID') endif # Make sure the patch file is where it should be. if not(finfo('!unpackp_sco_fname','exists')) then echo ERROR: The patch file "!unpackp_sco_fname" does not exist. return endif # # Determine which patch installation tool to use # setvar patch_tool_parm ups(ltrim(rtrim('!PATCH_TOOL'))) if patch_tool_parm = 'AUTOPAT' then setvar patch_tool_parm 'AUTOPAT' elseif (patch_tool_parm = 'PATCHIX') or (patch_tool_parm = '') then setvar patch_tool_parm 'PATCHIX' else echo ERROR: Invalid patch tool parameter "!patch_tool_parm". echo Parm must be AUTOPAT, PATCHIX, or blank. return endif # Output the copyright and disclosure information. echo echo * * * * * * * * echo echo NOTICE: Hewlett-Packard makes no warranty of any kind with regard to the echo information provided via HP ESC, including but not limited to, the echo implied warranties of merchantability and fitness for a particular purpose. echo echo Hewlett-Packard shall not be liable for errors contained within echo HP ESC or for incidental or consequential damages in connection with echo the furnishing or use of the information. echo echo Customer is hereby granted the right to use the information provided echo through HP ESC. No right, title, or interest in the information echo contained in and provided through HP ESC is granted to the echo Customer. echo echo Any HP or third party software or information provided through HP ESC echo is copyrighted. All rights reserved. Reproduction, adaptation echo or translation without prior written permission from HP is prohibited, echo except as allowed under the copyright laws and except that Customer may echo produce a single human readable copy of the data. Customer shall not echo transfer, sell or in any manner commercially exploit HP ESC or the echo data contained in it. In no event may Customer remove or obscure copyright echo notices contained in HP ESC and the information provided through HP ESC. echo echo Copyright Hewlett-Packard Company 1995" echo echo * * * * * * * * echo echo The patch ID (SCO number) is !unpackp_sco_id echo The Patch Tool is !patch_tool_parm setvar unpackp_oldcont hpautocont setvar hpautocont true setvar unpackp_frombyte_name 'UUE' + rht(unpackp_sco_id,5) purge !unpackp_frombyte_name > $null # The patch file needs to be converted from byte stream format # to MPE (non-bytestream) format before using STORE to unpackage it. echo echo Step 1: Converting the file from bytestream to MPE format. echo Note that this may take several minutes on a large patch. echo setvar hpcierr 0 setvar cjcw 0 xeq frombyte.hpbin.sys & '-b !unpackp_sco_fname !unpackp_frombyte_name' if (hpcierr <> 0) or (cjcw <> 0) then echo echo ERROR: The conversion of the file !unpackp_sco_fname failed. echo cjcw = !cjcw hpcierr = !hpcierr setvar hpautocont unpackp_oldcont return endif # Insure the group and account exists for the appropriate installation tool. if patch_tool_parm = 'AUTOPAT' then if not finfo('/TELESUP', 'exists') then echo Account TELESUP does not exist; creating account now echo setvar hpcierr 0 newacct telesup,mgr;cap=!hpacctcapf if hpcierr <> 0 then echo ERROR: Could not create the TELESUP account. setvar hpautocont unpackp_oldcont return endif endif if not finfo('/TELESUP/PATCHXL','exists') then echo Group PATCHXL.TELESUP does not exist; creating group now echo setvar hpcierr 0 newgroup patchxl.telesup;cap=ia,ba,ph,ds,mr if hpcierr <> 0 then echo ERROR: Could not create the PATCHXL.TELESUP group. setvar hpautocont unpackp_oldcont return endif endif setvar unpackp_store_parm 'group=patchxl;account=telesup;creator=mgr' else # PATCHIX case if not finfo('/SYS/PATCHXL','exists') then echo Group PATCHXL.SYS does not exist; creating group now. echo setvar hpcierr 0 newgroup patchxl.sys;cap=ia,ba if hpcierr <> 0 then echo ERROR: Could not create the PATCHXL.SYS group. setvar hpautocont unpackp_oldcont return endif endif setvar unpackp_store_parm 'group=patchxl;account=sys;creator=manager' endif # # Call STORE to unpackage the patch file back into individual # patch files in the original staging group and account. # echo echo Step 2: Using STORE/RESTORE to unpack the file... echo file unpkstor=!unpackp_frombyte_name;dev=disc restore *unpkstor;@.@.@;show;!unpackp_store_parm if storejcw <> 0 then echo echo Error restoring the fileset. STOREJCW = !storejcw setvar hpautocont unpackp_oldcont return endif echo echo Patch !unpackp_sco_id has been unpacked successfully. purge !unpackp_frombyte_name > $null reset unpkstor deletevar unpackp_@ setvar unpackp_jcw ok # -------------------- End of UNPACKP ------------------