$!Setup generator for SDH/Safety $!Copyright (c) 1994,1995,1996 Glenn C. Everhart. All rights reserved. $! Generates script to be run at startup time from the startup process. $!set symbol/verb/scope=noglobal $! Define symbols we use so they aren't from the external environment. $set:=set $set noon $! Be sure all files are close/nologd first $close/nolog jtmf $close/nolog strx $close/nolog jti $close/nolog jto $close/nolog dsvt $close/nolog tmp $close/nolog cfg $close/nolog d00d $close/nolog d1d $close/nolog d0d $del*ete:=delete $copy:=copy $write:=write $inquire:=inquire $if:=if $back*up:=backup $sysgen:=sysgen $sysman:=sysman $zmenu:=zmenu $ass*ign:=assign $def*ine:=define $close:=close $open:=open $read:=read $gosub:=gosub $! $aufmfg=" " $jtauthmaint:=$gcy$sys:jtauthmaint $purge:=purge $ask:==inquire $emit:==write sys$output $oldprv=f$setprv("cmkrnl,sysprv,log_io,phy_io,tmpmbx,volpro,detach") $tprv=f$privilege("cmkrnl,sysprv,log_io,phy_io,tmpmbx,volpro,detach") $if (tprv) then goto gotprv $write sys$output "Not enough privileges." $exit $gotprv: $ edelsav="*" $vmldst=0 $emit "" $if (f$search("sys$system:JTdriver.exe") .nes. "") then goto seedrvr $emit "%SDH-F-Cannot find driver. Exiting." $ exit $seedrvr: $goto tstdo $nocomp: $emit "Component missing. Exiting." $emit "Be sure all the component pieces exist in sys$system." $exit $tstdo: $! Be sure all needed files exist in system area $if f$trnlnm("GCY$SYS") .nes. "" $then $if f$search("gcy$sys:jtdmn.cld") .eqs. "" then goto nocomp $if f$search("gcy$sys:JtAuthMaint.exe") .eqs. "" then goto nocomp $if f$search("gcy$sys:JtdoLog.exe") .eqs. "" then goto nocomp $if f$search("gcy$sys:Jtdmn.exe") .eqs. "" then goto nocomp $endif $JTnum=0 $if f$search("sys$manager:SDH_Startup.com") .eqs. "" then goto gocfg $emit "SYS$MANAGER:SDH_STARTUP.COM already exists. Delete if you wish" $emit "to create a new one with this procedure." $ask ovrd "Continue anyway, adding new server" $if f$extract(0,1,f$edit(ovrd,"collapse,upcase")) .eqs. "Y" then goto gocfg $exit $gocfg: $fmk="/fcnmsk:66483" $fjtddb=" " $sjtddb=" " $fjtsys=" " $fparan="*" $sjtsys=" " $if f$trnlnm("GCY$SYS") .nes. "" $then $fjtsys="*" $sjtsys=f$trnlnm("GCY$SYS") $endif $if f$trnlnm("JTD$DB") .nes. "" $then $fjtddb="*" $sjtddb=f$trnlnm("JTD$DB") $endif $ndsk=0 $ndskst=ndsk $domkspc=0 $set comm sys$system:zmenu $zmlc=4 $ choice=4 $ goto skipchc $dovrchc: $zmenu/POINTER="-->"/initial='zmlc' EACF-Security / DeleteProtect / HSM Selection Please select which functions you are licensed for: ^ Restrict setup to EACF functions only ^ Restrict setup to DPS (Deletion Protect) functions only ^ Restrict setup to HSM functions only ^ Full function setup (highly recommended) ^ Quit, not ready to configure now Note that combined setup allows choice of all functions of all packages but only those licensed will actually function. $ if choice .eq. 5 then exit $ if choice .eq. 1 $ then $ @sys$manager:jt_setup_eacf $ exit $ endif $ if choice .eq. 2 $ then $ @sys$manager:jt_setup_dEL $ exit $ endif $ if choice .eq. 3 $ then $ @sys$manager:jt_setup_hsm $ exit $ endif $ skipchc: $ ! if here, choice .eq. 4 so go ahead and do combined setup. $ vmldst=0 $ fswpo="*" $ strswpop="SWAP" $ flnko=" " $ frlko=" " $zmlc=5 $ choice=5 $ goto xchoice2 $mdomenu: $mdomnu: $zmenu/POINTER="-->"/SYMBOLS/initial='zmlc' ¿#6¿[1;7mSafety HSM CONTROL/MAINTENANCE¿[m Selects how the "space finding" script marks and moves files. (You need to run GCY$SYS:JTSPACE_TAILOR.COM also.) ^ 'fswpo'Use "Shelving" operations to move files ^ 'frlko'Use "readonly softlink" operations to move files ^ 'flnko'Use "softlink" operations to move files ^ Explain the file moving styles ^ Proceed to set up SDH configuration file ^ Unshelve all files on a disk if space exists (assumes SDH is running) ^ Stop a running SDH server cleanly ^ Start a server that is already configured ^ 'fparan'Enable "check all opens" (paranoid mode) mode ^ 'edelsav'Enable undelete functions ^ Quit, do nothing $! $!zmlc = choice $ if choice .eq. 11 then exit $ if choice .eq. 10 $ then $ if edelsav .eqs. " " $ then $ edelsav="*" $ else $ edelsav=" " $ endif $ goto mdomnu $ endif $ if choice .eq. 9 $ then $ if fparan .eqs. " " $ then $ fparan="*" $ else $ fparan=" " $ endif $ goto mdomnu $ endif $ if choice .eq. 1 $ then $ strswpop="SWAP" $ fswpo="*" $ flnko=" " $ frlko=" " $ goto mdomnu $ endif $ if choice .eq. 2 $ then $ strswpop="LINK" $ fswpo=" " $ flnko="*" $ frlko=" " $ goto mdomnu $ endif $ if choice .eq. 3 $ then $ strswpop="RLNK" $ fswpo=" " $ flnko=" " $ frlko="*" $ goto mdomnu $ endif $ if choice .eq. 4 $ then $ copy sys$input sys$output The "styles" referred to are the ways that files are moved when moved by automatic or semiautomatic means (e.g., when the disk fills up). These are configured according to your site policy. There are 3 types of operations which can be used to move files to backing store when free space is being claimed. in SHELVING, a file is copied to nearline storage and truncated to zero blocks on the main disk. When the file is opened, it is copied from nearline disk back to its original site and erased from nearline storage. Thus it is automatically retrieved when accessed. in SOFTLINKs, the file is copied to nearline storage and any opens afterwards access the file directly on nearline storage. The original file is truncated to zero blocks and kept as a pointer so that the file acts as if still on main disk. Be aware that the automatic unshelve menu item is ineffective for softlinks of either type. in READONLY SOFTLINKs, the file is copied to nearline storage. If it is opened for read only, it is accessed on the nearline storage and left there. If it is opened for any kind of write or update access, it is treated as shelved and unshelved automatically. Softlinks require that files be kept on disk type storage, using anything that acts like a disk to VMS. Note too that if using the READONLY SOFTLINK method, if someone opens a file for read, and someone else opens it for update and updates it after, the first accessor will not see the updates. Since the link will be deleted after inswap (takes effect once it is closed by all readers), LATER readers will however see the updates since the file will be on normal disk. $eod $ ask xjnkkk "Enter return to continue>" $ goto mdomnu $ endif $if choice .eq. 6 $ then $! unshelve all $ ask udevice "What device should have all files unshelved from it" $ if udevice .eqs. "" then goto mdomenu $ JTa_summlen = "99999999999" $set noon $ JTauthmaint 'udevice'[000000]corimg.sys\%PURGE $ JTauthmaint 'udevice'[000000]corimg.sys\%SUMM $ if f$integer(JTa_summlen) .ge. f$getdvi(udevice,"freeblocks") $ then $ emit "%SDH-F-NoRoom Not enough room on device to unshelve everything" $ emit " You must delete some files to make room to unshelve all files." $ emit " Total size of shelved files is",JTa_summlen $ wait 0:0:02 $ goto mdomnu $ endif $ ! JTa_summfile is the filename of summary file $ open/read JTmf 'JTa_summfile' $ fillin=" " $ read/end=cJTmf JTmf fillin $ sJTmf: $ fillin=f$extract(0,f$locate("(",fillin)-1,fillin) $ fillin = f$edit(fillin,"upcase,collapse") $ ! force inswap $! Following operation does so with minimal overhead, forcing reading. $ copy 'fillin' nla0: $ goto sJTmf $ cJTmf: $ close/nolog JTmf $ delete 'f$search(JTa_summfile)' $ goto mdomnu $ endif $if choice .eq. 7 $ then $ emit "Please select FIRST device controlled by an SDH server" $ emit "The following commands contain the disks eligible:" $ search/nohead/match=and sys$manager:JTm_d*.daemon hsa,deas $ ask udevice "What device should have its SDH server stopped" $ if udevice .eqs. "" then goto mdomenu $ desdvc="Sf" + udevice - ":" - "_" - "_" $ desdvc = f$edit(desdvc,"upcase,collapse") $ uctxt="" $ prclc3: $ uxpid=f$pid(uctxt) $ if uxpid .eqs. "" $ then $ emit "%SDH-W-Cannot find server. Specify the FIRST device which the" $ emit " SDH server controls, please." $ goto mdomnu $ endif $ prcnam=f$getjpi(uxpid,"prcnam") $ forcex :==$gcy$sys:forcex $ if f$edit(prcnam,"upcase,collapse") .eqs. desdvc $ then $ forcex 'uxpid' $! Now clean up any outstanding assigns that use the same JTAn unit. $! Rely on our having put the JTdmn/deas in for the main one... $ fillin = " " $ open/read strx sys$manager:SDH_Startup.com $v2strx: $ read/end=v1strx strx fillin $ if f$locate(udevice,fillin) .ge. f$length(fillin) then goto v2strx $! we found a line containing desired device. $! now find JTAnnn: string and isolate it. $ close/nolog strx $ fillin=f$edit(fillin,"upcase") $ lJTa=f$locate("JTA",fillin) $ fillin=f$extract(lJTa,f$length(fillin),fillin) $ fillin = f$extract(0,f$locate(":",fillin),fillin) $ JTanam="/SHARE:"+fillin $JTdmn:==$gcy$sys:JTdmn $ open/read strx sys$manager:SDH_Startup.com $ v3strx: $ read/end=v1strx strx fillin $ if f$locate(JTanam,fillin) .ge. f$length(fillin) then goto v3strx $ got one of the share lines. add /deas $ fillin = fillin - JTanam $ fillin = "$JTdmn/deas"+f$extract(6,f$length(fillin),fillin) $ 'fillin' $ goto v3strx $v1strx: $ close/nolog strx $ goto mdomnu $ endif $ goto prclc3 $ ! $ endif $if choice .eq. 8 $ then $! SDH startup won't start already active JT device daemons and the $! /share ones should be ok to run twice. $ @sys$manager:SDH_Startup $ exit $ endif $xchoice2: $! default choice .eq. 5 $JTnum=0 $dtsts: $if f$search("sys$manager:SDH_Startup.com") .eqs. "" then goto gocfg2 $emit "SYS$MANAGER:SDH_Startup.COM already exists. Delete if you wish" $emit "to create a new one with this procedure." $ask ovrd "Continue anyway, adding new server[Y/N][N]" $if f$extract(0,1,f$edit(ovrd,"collapse,upcase")) .eqs. "Y" then goto gocfg $exit $gocfg2: $fmk="/fcnmsk:66451" $fJTddb=" " $sJTddb=" " $fJTsys=" " $sJTsys=" " $if f$trnlnm("GCY$SYS") .nes. "" $then $fJTsys="*" $sJTsys=f$trnlnm("GCY$SYS") $endif $if f$trnlnm("JTD$DB") .NES. "" $then $fJTddb="*" $sJTddb=f$trnlnm("JTD$DB") $endif $ndsk=0 $noutarea=0 $ndskst=ndsk $edelsav="*" $fdelsav=" " $sdelsav="" $if f$trnln("delsav") .nes. "" $then $fdelsav="*" $sdelsav=f$trnlnm("DELSAV") $delsv=sdelsav $endif $gblmode=0 $ignfiles="" $imgf=0 $zmlc=1 $ spcmd=1 $fgcmm="*" $fgrnm=" " $fgcpy=" " $fgsca=" " $fgdla=" " $fgndl=" " $fgdrm=" " $fgdsv=" " $fgdog=" " $fgbkd=" " $fcspm="*" $fgign=" " $if sjtddb .nes. "" then gcyscratch=sjtddb $if sjtddb .nes. "" .and. sdelsav .eqs. "" then delsv=sjtddb $if f$trnlnm("GCY$SCRATCH").nes."" $then $gcyscratch=f$trnlnm("GCY$SCRATCH") $fgsca="*" $endif $if f$trnlnm("DELSAV").nes. "" $then $delsv=f$trnlnm("DELSAV") $sdelsav=delsv $fdelsav="*" $fgdla="*" $endif $! Set up some defaults. We must have someplace where programs are $! kept, but if that may be sys$system:, let us define that to be ok. $! Also if it's sys$sysdevice:[eacf] that should be ok also. (That is $! the default in kitinstal after all.) $ if f$trnlnm("GCY$SYS") .eqs. "" $ then $ if f$search("sys$system:jtdmn.exe") .nes. "" .and. - f$search("sys$system:jtauthmaint.exe") .nes. "" $ then $! Looks like gcy$sys is in sys$system $ ass/sys/exec sys$system gcy$sys $ fjtsys="*" $ sjtsys="SYS$SYSTEM:" $ endif $! Look in [EACF] now. $ if f$search("SYS$SYSDEVICE:[EACF]jtdmn.exe") .nes. "" .and. - f$search("SYS$SYSDEVICE:[EACF]jtauthmaint.exe") .nes. "" $ then $! Looks like gcy$sys is in SYS$SYSDEVICE:[EACF] $ ass/sys/exec SYS$SYSDEVICE:[EACF] gcy$sys $ fjtsys="*" $ sjtsys="SYS$SYSDEVICE:[EACF]" $ endif $ endif $ if f$trnlnm("GCY$SYS") .nes. "" $ then $ If fjtddb .nes. "*" $ then $ ! No default for database files. So default that area to the $ ! same as the program files, just so THAT is defined now. $ Ass/sys/exec 'f$trnlnm("GCY$SYS")' JTd$db $fJTddb="*" $sJTddb=f$trnlnm("JTD$DB") $if f$trnln("delsav") .eqs. "" $then $Ass/sys/exec 'f$trnlnm("GCY$SYS")' delsav $fdelsav="*" $sdelsav=f$trnlnm("DELSAV") $delsv=sdelsav $endif $if sjtddb .nes. "" then gcyscratch=sjtddb $if sjtddb .nes. "" .and. sdelsav .eqs. "" then delsv=sjtddb $if f$trnlnm("GCY$SCRATCH").eqs."" $then $ ass/sys/exec 'f$trnlnm("GCY$SYS")' gcy$scratch $gcyscratch=f$trnlnm("GCY$SCRATCH") $fgsca="*" $endif $ endif $ endif $ zmlc=4 $domenu: $domnu: $ fgcysy=sjtsys $ fgcycm=sjtddb $ ffscrr=gcyscratch $zmenu/POINTER="-->"/SYMBOLS/initial='zmlc' ¿#6¿[1;7mSafety (SDH) SETUP¿[m 00:00:00 ^ 'fjtddb'Set area to hold SDH database files ('fgcycm') ^ Set start intercept driver unit number (now 'ndsk') ^ 'fjtsys'Set area for SDH images ('fgcysy') ^ Done this menu, process disk selection ^ Remove a disk from an existing SDH configuration ^ Set images which are exempt from SDH (e.g. defraggers) ^ 'fgsca'Set area for scratch ('ffscrr') ^ 'fgdla'Set area to save deleted or shelved files ('delsv') ^ Set mode of deletion handling (current value: 'gblmode') ^ 'fcspm'Enable/Disable volume space monitoring ^ Remove a disk from SDH startup configuration ^ Set file moving handling modes (experts only, please.) ^ Quit, do nothing $if choice .eq. 13 $ then $! close/nolog cfg $ exit $ endif $if choice .eq. 12 $ then $ goto mdomenu $ endif $zmlc=choice $if choice .eq. 11 $ then $ if f$search("sys$manager:SDH_Startup.com") .eqs. "" $ then $ emit "%SDH-W-no previous configuration exists." $ goto domnu $ endif $ emit " **** BEWARE *** " $ emit " Don't remove disks if you have files shelved on them already." $ emit " Instead run the separate unshelve script first to unshelve files" $ emit " on the disk, THEN change the configuration." $ emit "Current configuration:" $ search/nohigh sys$manager:SDH_Startup.com "$JTdmn" $ emit "" $ ask drmv "Enter disk name to remove, NONE for none" $ if drmv .eqs. "" .or. drmv .eqs. "NONE" then goto domnu $ text = " " $ open/read JTi sys$manager:SDH_Startup.com $ open/write JTo sys$manager:SDH_Startup.com $rlpu: $ read/end=clsm JTi text $ ltxt=f$length(text) $ if f$locate(drmv,text) .ge. ltxt then write JTo text $ goto rlpu $clsm: $ close/nolog JTo $ close/nolog JTi $ goto domnu $ endif $if choice .eq. 11 $ then $ vmldst=0 $ goto wundst ! *********** patch out multiple dests for v1 ********** $ emit "If multiple destinations are desired they will be selected after" $ emit "disks being selected as source disks for this server are selected." $ ask mdest "Should multiple disk areas be used for shelved files[Y/N][Y]" $if f$extract(0,1,f$edit(mdest,"collapse,upcase")) .nes. "Y" then goto wundst $! multiple destinations $ vmldst = 1 $ copy gcy$sys:JTfilsavmdsk.com gcy$sys:filsav.com $ copy gcy$sys:JTfilrstmdsk.com gcy$sys:filrst.com $ pur gcy$sys:fil*.com $ goto domnu $wundst: $ ask idsv "Give area to place shelved files" $ if idsv .nes. "" $ then $ on error then goto dsfu $ open/write dsvt 'idsv'test.junk $ write dsvt "test" $ close/nolog dsvt $ delete 'idsv'test.junk. $ sdelsav=idsv $ delsv = sdelsav $ fdelsav="*" $ copy gcy$sys:JTfilsav.com gcy$sys:filsav.com $ copy gcy$sys:JTfilrst.com gcy$sys:filrst.com $ goto domnu $dsfu: $emit "%SDH-W-Nodir - cannot write to this area. Ignored," $wait 0:0:05 $on error then continue $ endif $ goto domnu $ endif $if choice .eq. 10 $ then $ if fcspm .eqs. " " $ then $ spcmd=1 $ fcspm="*" $ else $ spcmd=0 $ fcspm=" " $ endif $ if domkspc .eq. 0 $ then $ emit "You need to run the JTSPACE_TAILOR script to set up your site" $ emit "space making policy. You may run this later but it is best run" $ emit "now." $ ask mdkmk "Shall we set site space-making policy now [Y/N]?" $ if f$extract(0,1,f$edit(mdkmk,"collapse,upcase")) .eqs. "Y" $ then $ @gcy$sys:jtspace_tailor $ domkspc=1 $ endif $ endif $ goto domnu $ endif $if choice .eq. 9 $ then $zmlcm = 1 $getmode: $! set modes for this daemon in gblmode parameter $zmenu/POINTER="-->"/SYMBOLS/initial='zmlcm' ¿#6¿[1;7mSafety / SDH MODES SETUP¿[m 00:00:00 ^ 'fgcmm' Run .COM file FILDEL.COM to process deletions ^ 'fgrnm' Rename deleted files on volume to wastebasket ^ 'fgcpy' Copy deleted files to wastebasket area (sys undel only) ^ 'fgndl' Don't delete any files after processing ^ 'fgdrm' Delete file if no room for saving (else do not delete) ^ 'fgbkd' Run GCY$CM:DELBAK.COM before wastebasket purges ^ 'fgign' Set files to ignore (allowing normal deletion of them) ^ 'fgdsv' Set to delete linked-to or shelved files (in del_shelved) ^ 'fgdog' Set to delete files in link-delete script del_shelved.com ^ Done this menu ^ Quit this menu, leave major modes alone $ if choice .eq. 11 then goto domnu $ zmlcm = choice $ if choice .eq. 10 $ then $ mjmd=0 $ if fgrnm.eqs."*" then mjmd=1 $ if fgcpy.eqs."*" then mjmd=2 $ gblmode=mjmd $ if fgndl.eqs."*" then gblmode=gblmode + 4 $ if fgdrm.eqs."*" then gblmode=gblmode + 16 $ if fgbkd.eqs."*" then gblmode=gblmode + 64 $ if fgdsv.eqs."*" then gblmode=gblmode + 128 $ if fgdog.eqs."*" then gblmode=gblmode + 512 $ goto domnu $ endif $ if choice .eq. 8 $ then $ if fgdsv .eqs. " " $ then $ fgdsv="*" $ else $ fgdsv=" " $ endif $ goto getmode $ endif $ if choice .eq. 9 $ then $ if fgdog .eqs. " " $ then $ fgdog="*" $ else $ fgdog=" " $ endif $ goto getmode $ endif $ if choice .eq. 1 $ then $ fgcmm="*" $ fgrnm=" " $ fgcpy=" " $ goto getmode $ endif $ if choice .eq. 2 $ then $ fgcmm=" " $ fgrnm="*" $ fgcpy=" " $ goto getmode $ endif $ if choice .eq. 3 $ then $ fgcmm=" " $ fgrnm=" " $ fgcpy="*" $ goto getmode $ endif $ if choice .eq. 4 $ then $ if fgndl .eqs. " " $ then $ fgndl="*" $ else $ fgndl=" " $ endif $ goto getmode $ endif $ if choice .eq. 5 $ then $ if fgdrm .eqs. " " $ then $ fgdrm="*" $ else $ fgdrm=" " $ endif $ goto getmode $ endif $ if choice .eq. 6 $ then $ if fgbkd .eqs. " " $ then $ fgbkd="*" $ else $ fgbkd=" " $ endif $ goto getmode $ endif $ if choice .eq. 7 $ then $ if fgign .eqs. " " $ then $ fgign="*" $ emit "Enter file strings to ignore as normal wildcard STRINGS" $ emit "Thus to omit *.OBJ, enter *.OBJ* since string matching rules" $ emit "are used. Several specifications can be entered, comma separated." $ ask ifs "Filestrings to ignore:" $ if ifs .eqs. "" $ then $ fgign=" " $ goto getmode $ endif $ ignfiles=ifs $ else $ emit "Current ignore list is:" $ emit ignfiles $ ask adf "Add more strings to ignore [Y/N][N]" $ if f$extract(0,1,f$edit(adf,"collapse,upcase")) .nes. "Y" then goto Zoign $ ask adf "Filestring:" $ if adf .eqs. "" then goto getmode $ ignfiles=ignfiles + "," + adf $ emit "New ignore list is:" $ emit ignfiles $ wait 0:0:03 $ goto getmode $Zoign: $ fgign=" " $ ignfiles="" $ endif $ goto getmode $ endif $ goto domnu $ endif $if choice .eq. 7 $then $ask scr "Disk:[directory] for scratch use" $if sjtddb .nes. "" .and. scr .eqs. "" then gcyscratch=sjtddb $if scr .nes. "" then gcyscratch=scr $ fgsca=" " $ if gcyscratch .nes. "" then fgsca="*" $goto domenu $endif $if choice .eq. 8 $then $ask dsv "Save area for deleted files" $if sjtddb .nes. "" .and. dsv .eqs. "" then delsv=sjtddb $if sjtddb .nes. "" .and. dsv .eqs. "" then sdelsav=sjtddb $if sjtddb .nes. "" .and. dsv .eqs. "" then fdelsav="*" $if dsv .nes. "" $ then $ delsv=dsv $ sdelsav = dsv $ fdelsav="*" $ endif $ fgdla = fdelsav $goto domenu $endif $if choice .eq. 6 $ then $ if fjtsys .nes. "*" $ then $ emit "%SDH-E- Must define executable area first" $ goto domnu $ endif $copy sys$input sys$output In the following, please enter images that will be EXEMPT from SDH access checks. That is, these images will be free to open files as they like; access TO these images can be checked. The list should include defragmenters and similar utilities you have. You can use wildcards (e.g. *BACKUP.EXE*) to shorten strings, but BE CAREFUL with these. A wildcard path CAN BE SPOOFED. If you include the FULL device:[directory]file.ext;version path, you can be sure the image granted access is the one you want. Note the list is global to the whole system and can have at most 32 items. The file is in GCY$SYS:EXEMPT.IMAGES if you wish to edit it. $ if f$search("gcy$sys:exempt.images") .eqs. "" $ then $ open/write xim gcy$sys:exempt.images $ imgf=1 $gim1: $ ask imst "Image path string" $ if imst .eqs. "" $ then $ close/nolog xim $ goto domnu $ endif $ write xim imst $ goto gim1 $ else $ imgf=1 $ open/append xim gcy$sys:exempt.images $gim2: $ ask imst "Image path string" $ if imst .eqs. "" $ then $ close/nolog xim $ goto domnu $ endif $ write xim imst $ goto gim2 $ endif $ goto domnu $endif $if choice .eq. 4 then goto bldcfg $if choice .eq. 2 $ then $ ask dstrt "Enter start unit number for intercept" $ if dstrt .eqs. "" then goto domnu $ ndsk=f$integer(dstrt) $ ndskst=ndsk $ goto domnu $ endif $if choice .eq. 5 $ then $ if f$search("sys$manager:SDH_startup.com") .eqs. "" $ then $ emit "%SDH-W-no previous configuration exists." $ goto domnu $ endif $ emit "Current configuration:" $ search/nohigh sys$manager:SDH_startup.com "$jtdmn" $ emit "" $ ask drmv "Enter disk name to remove, NONE for none" $ if drmv .eqs. "" .or. drmv .eqs. "NONE" then goto domnu $ text = " " $ open/read JTi sys$manager:SDH_startup.com $ open/write JTo sys$manager:SDH_startup.com $rlpu: $ read/end=clsm JTi text $ ltxt=f$length(text) $ if f$locate(drmv,text) .ge. ltxt then write JTo text $ goto rlpu $clsm: $ close/nolog JTo $ close/nolog JTi $ goto domnu $ endif $if choice .eq. 1 $then $ask iarea "Give area for database files (dvc:dir)" $if iarea .eqs. "" then goto domnu $!check if it exists by trying to put a file there $open/write tmp 'iarea'tfil.tmp $close/nolog tmp $ttt=iarea+"tfil.tmp" $if f$search(ttt) .nes. "" $then $del 'ttt'. $fjtddb="*" $sjtddb=iarea $goto domnu $endif $emit "%SDH-E-Area does not exist or cannot be written." $wait 0:0:06 $goto domnu $endif $if choice .eq. 3 $then $ask iarea "Give area for executable files (dvc:dir)" $if iarea .eqs. "" then goto domnu $!check if it exists by trying to put a file there $open/write tmp 'iarea'tfil.tmp $close/nolog tmp $ttt=iarea+"tfil.tmp" $if f$search(ttt) .nes. "" $then $del 'ttt'. $fjtsys="*" $sjtsys=iarea $goto domnu $endif $emit "%SDH-E-Area does not exist or cannot be written." $wait 0:0:06 $goto domnu $endif $bldcfg: $if fjtddb .nes. "*" $then $emit "SDH-F-Must define database location before disk select" $goto domnu $endif $write sys$output "%SDH-I-Working..." $if f$search("sys$manager:SDH_startup.com") .eqs. "" $then $open/write cfg sys$manager:SDH_startup.com $else $open/append cfg sys$manager:SDH_startup.com $endif $write cfg "$! Define symbols we use so they aren't from the external environment." $write cfg "$set:=set" $write cfg "$set noon" $write cfg "$del*ete:=delete" $write cfg "$copy:=copy" $write cfg "$submit:=submit" $write cfg "$write:=write" $write cfg "$inquire:=inquire" $write cfg "$if:=if" $write cfg "$back*up:=backup" $write cfg "$zmenu:=zmenu" $write cfg "$ass*ign:=assign" $write cfg "$def*ine:=define" $write cfg "$close:=close" $write cfg "$open:=open" $write cfg "$read:=read" $write cfg "$gosub:=gosub" $! $write cfg "$sysgen:==$sysgen" $write cfg "$sysman:==$sysman" $if f$getsyi("CPU").ge. 128 then write cfg "$sysgen:==mc sysman io" $ttt="$assign/sys/exec "+sjtddb+" jtd$db" $write cfg ttt $ttt="assign/sys/exec "+sjtddb+" jtd$db" $'ttt' $ttt="$assign/sys/exec "+sJTddb+" JTd$JT" $write cfg ttt $ttt="assign/sys/exec "+sJTddb+" JTd$JT" $'ttt' $ttt="$assign/sys/exec "+sjtddb+" gcy$cm" $write cfg ttt $ttt="assign/sys/exec "+sjtddb+" gcy$cm" $'ttt' $ttt="$assign/sys/exec "+sjtddb+" gce$delseq $write cfg ttt $ttt="assign/sys/exec "+sjtddb+" gce$delseq $'ttt' $ttt="$assign/sys/exec "+sjtsys+" gcy$sys" $write cfg ttt $ttt="assign/sys/exec "+sjtsys+" gcy$sys" $'ttt' $ttt="$assign/sys/exec "+delsv+" delsav" $write cfg ttt $ttt="assign/sys/exec "+delsv+" delsav" $'ttt' $ttt="$assign/sys/exec "+delsv+" gcy$scratch" $copy gcy$sys:*.com gcy$cm: $pur gcy$cm:*.com $write cfg ttt $write cfg "$set command gcy$sys:JTdmn" $ttt="assign/sys/exec "+delsv+" gcy$scratch" $'ttt' $ttt="$assign/sys/exec "+gcyscratch+" gcy$scratch" $write cfg ttt $ttt="assign/sys/exec "+gcyscratch+" gcy$scratch" $'ttt' $write cfg "$set command gcy$sys:jtdmn" $write cfg "$jtau*thmaint:==$gcy$sys:jtauthmaint" $jtau*thmaint:==$gcy$sys:jtauthmaint $write cfg "$jtdolog:==$gcy$sys:jtdolog" $gosub gen_dsk_syms $!set comm gcy$sys:zmenu $if f$search("sys$scratch:SDH_dsks.mnuscr") .nes. "" then del sys$scratch:SDH_dsks.mnuscr. $copy sys$input sys$scratch:SDH_dsks.mnuscr ¿#6¿[1;7mSDH Configuration¿[m (Non-system) Disk Selection Use arrows to move to selection. Use RETURN to select. ^ End disk selection ^ 'dv1' 'dp1' 'dq1' ^ 'dv2' 'dp2' 'dq2' ^ 'dv3' 'dp3' 'dq3' ^ 'dv4' 'dp4' 'dq4' ^ 'dv5' 'dp5' 'dq5' ^ 'dv6' 'dp6' 'dq6' ^ 'dv7' 'dp7' 'dq7' ^ 'dv8' 'dp8' 'dq8' ^ 'dv9' 'dp9' 'dq9' ^ 'dv10' 'dp10' 'dq10' ^ 'dv11' 'dp11' 'dq11' ^ 'dv12' 'dp12' 'dq12' ^ 'dv13' 'dp13' 'dq13' ^ 'dv14' 'dp14' 'dq14' ^ 'dv15' 'dp15' 'dq15' ^ 'dv16' 'dp16' 'dq16' ^ 'dv17' 'dp17' 'dq17' ^ 'dv18' 'dp18' 'dq18' ^ 'dv19' 'dp19' 'dq19' ^ 'dv20' 'dp20' 'dq20' ^ 'dv21' 'dp21' 'dq21' ^ 'dv22' 'dp22' 'dq22' ^ 'dv23' 'dp23' 'dq23' ^ 'dv24' 'dp24' 'dq24' ^ 'dv25' 'dp25' 'dq25' ^ 'dv26' 'dp26' 'dq26' ^ 'dv27' 'dp27' 'dq27' ^ 'dv28' 'dp28' 'dq28' ^ 'dv29' 'dp29' 'dq29' ^ 'dv30' 'dp30' 'dq30' ^ 'dv31' 'dp31' 'dq31' ^ 'dv32' 'dp32' 'dq32' ^ 'dv33' 'dp33' 'dq33' ^ 'dv34' 'dp34' 'dq34' ^ 'dv35' 'dp35' 'dq35' ^ 'dv36' 'dp36' 'dq36' ^ 'dv37' 'dp37' 'dq37' ^ 'dv38' 'dp38' 'dq38' ^ 'dv39' 'dp39' 'dq39' ^ 'dv40' 'dp40' 'dq40' ^ 'dv41' 'dp41' 'dq41' ^ 'dv42' 'dp42' 'dq42' ^ 'dv43' 'dp43' 'dq43' ^ 'dv44' 'dp44' 'dq44' ^ 'dv45' 'dp45' 'dq45' ^ 'dv46' 'dp46' 'dq46' ^ 'dv47' 'dp47' 'dq47' ^ 'dv48' 'dp48' 'dq48' ^ 'dv49' 'dp49' 'dq49' ^ 'dv50' 'dp50' 'dq50' ^ 'dv51' 'dp51' 'dq51' ^ 'dv52' 'dp52' 'dq52' ^ 'dv53' 'dp53' 'dq53' ^ 'dv54' 'dp54' 'dq54' ^ 'dv55' 'dp55' 'dq55' ^ 'dv56' 'dp56' 'dq56' ^ 'dv57' 'dp57' 'dq57' ^ 'dv58' 'dp58' 'dq58' ^ 'dv59' 'dp59' 'dq59' ^ 'dv60' 'dp60' 'dq60' ^ 'dv61' 'dp61' 'dq61' ^ 'dv62' 'dp62' 'dq62' ^ 'dv63' 'dp63' 'dq63' ^ 'dv64' 'dp64' 'dq64' ^ 'dv65' 'dp65' 'dq65' ^ 'dv66' 'dp66' 'dq66' ^ 'dv67' 'dp67' 'dq67' ^ 'dv68' 'dp68' 'dq68' ^ 'dv69' 'dp69' 'dq69' ^ 'dv70' 'dp70' 'dq70' ^ 'dv71' 'dp71' 'dq71' ^ 'dv72' 'dp72' 'dq72' ^ 'dv73' 'dp73' 'dq73' ^ 'dv74' 'dp74' 'dq74' ^ 'dv75' 'dp75' 'dq75' ^ 'dv76' 'dp76' 'dq76' ^ 'dv77' 'dp77' 'dq77' ^ 'dv78' 'dp78' 'dq78' ^ 'dv79' 'dp79' 'dq79' ^ 'dv80' 'dp80' 'dq80' ^ 'dv81' 'dp81' 'dq81' ^ 'dv82' 'dp82' 'dq82' ^ 'dv83' 'dp83' 'dq83' ^ 'dv84' 'dp84' 'dq84' ^ 'dv85' 'dp85' 'dq85' ^ 'dv86' 'dp86' 'dq86' ^ 'dv87' 'dp87' 'dq87' ^ 'dv88' 'dp88' 'dq88' ^ 'dv89' 'dp89' 'dq89' ^ 'dv90' 'dp90' 'dq90' ^ 'dv91' 'dp91' 'dq91' ^ 'dv92' 'dp92' 'dq92' ^ 'dv93' 'dp93' 'dq93' ^ 'dv94' 'dp94' 'dq94' ^ 'dv95' 'dp95' 'dq95' ^ 'dv96' 'dp96' 'dq96' ^ 'dv97' 'dp97' 'dq97' ^ 'dv98' 'dp98' 'dq98' ^ 'dv99' 'dp99' 'dq99' ^ 'dv100' 'dp100' 'dq100' ^ 'dv101' 'dp101' 'dq101' ^ 'dv102' 'dp102' 'dq102' ^ 'dv103' 'dp103' 'dq103' ^ 'dv104' 'dp104' 'dq104' ^ 'dv105' 'dp105' 'dq105' ^ 'dv106' 'dp106' 'dq106' ^ 'dv107' 'dp107' 'dq107' ^ 'dv108' 'dp108' 'dq108' ^ 'dv109' 'dp109' 'dq109' ^ 'dv110' 'dp110' 'dq110' ^ 'dv111' 'dp111' 'dq111' ^ 'dv112' 'dp112' 'dq112' ^ 'dv113' 'dp113' 'dq113' ^ 'dv114' 'dp114' 'dq114' ^ 'dv115' 'dp115' 'dq115' ^ 'dv116' 'dp116' 'dq116' ^ 'dv117' 'dp117' 'dq117' ^ 'dv118' 'dp118' 'dq118' ^ 'dv119' 'dp119' 'dq119' ^ 'dv120' 'dp120' 'dq120' ^ 'dv121' 'dp121' 'dq121' ^ 'dv122' 'dp122' 'dq122' ^ 'dv123' 'dp123' 'dq123' ^ 'dv124' 'dp124' 'dq124' ^ 'dv125' 'dp125' 'dq125' ^ 'dv126' 'dp126' 'dq126' ^ 'dv127' 'dp127' 'dq127' ^ 'dv128' 'dp128' 'dq128' ^ 'dv129' 'dp129' 'dq129' ^ 'dv130' 'dp130' 'dq130' ^ 'dv131' 'dp131' 'dq131' ^ 'dv132' 'dp132' 'dq132' ^ 'dv133' 'dp133' 'dq133' ^ 'dv134' 'dp134' 'dq134' ^ 'dv135' 'dp135' 'dq135' ^ 'dv136' 'dp136' 'dq136' ^ 'dv137' 'dp137' 'dq137' ^ 'dv138' 'dp138' 'dq138' ^ 'dv139' 'dp139' 'dq139' ^ 'dv140' 'dp140' 'dq140' ^ 'dv141' 'dp141' 'dq141' ^ 'dv142' 'dp142' 'dq142' ^ 'dv143' 'dp143' 'dq143' ^ 'dv144' 'dp144' 'dq144' ^ 'dv145' 'dp145' 'dq145' ^ 'dv146' 'dp146' 'dq146' ^ 'dv147' 'dp147' 'dq147' ^ 'dv148' 'dp148' 'dq148' ^ 'dv149' 'dp149' 'dq149' ^ 'dv150' 'dp150' 'dq150' ^ Other disk not in list (MUST be mounted) $eod $! $getdsk: $zmenu/scroll/symbols sys$scratch:SDH_dsks.mnuscr $ choice = choice -1 $ if choice .eq. 0 then goto wrapup $ if choice .ne. 0 then $aufmfg=" " $ if choice .eq. 151 $ then $ ask dsk "Give disk name" $ if dsk .eqs. "" then goto getdsk $ if f$getdvi(dsk,"MNT") .nes. "TRUE" then goto getdsk $ goto intac $ endif $ chcn=f$integer(choice) $ dp'chcn' = "*" $ dsk = dv'chcn' $if dsk .eqs. "" then goto wrapup $goto intac $wildsk: $wild=1 $dsk=f$device(,"DISK") $if dsk .eqs. "" then goto wrapup $if f$getdvi(dsk,"MNT") .nes. "TRUE" then goto wildsk $intac: $JTnm="JTA"+f$string(ndsk)+":" $ccmd="$sysgen connect "+JTnm+"/noada/driver=JTdriver" $if ndsk.eq.ndskst .and. f$getsyi("CPU") .ge. 128 $then $ccmd=ccmd-"JTdriver" + "sys$system:JTdriver" $endif $skfg=" " $fdfl=" " $fidsw=" " $kmon=" " $aufm=" " $ jta_listfile="" $set noon $ jtauthmaint 'dsk'[000000]corimg.sys\%LIST $ fidfl=f$edit(jta_listfile,"trim,collapse,upcase") $ fidfl=f$search(fidfl) $ ffilfl=f$extract(0,f$locate(";",fidfl),fidfl) $ if fidfl .nes. "" then fidsw="/FILENUM:"+Ffilfl $ pur 'ffilfl' $gndb=" " $ jta_listfile="" $set noon $ jtauthmaint 'dsk'[000000]corimg.sys\%LIST $ fidfl=f$edit(jta_listfile,"trim,collapse,upcase") $ fidfl=f$search(fidfl) $ ffilfl=f$extract(0,f$locate(";",fidfl),fidfl) $ if fidfl .nes. "" then fidsw="/FILENUM:"+Ffilfl $ aufm="*" $! Store the necessary command to generate the listing and the $! purge commands $ autgna="$jtauthmaint "+dsk+"[000000]corimg.sys\%LIST" $ autpga="$purge "+Ffilfl $ aufmfg="*" $kmal=" " $kstr="" $ifrac=4 $imin=10 $imax=100000 $ffgr="*" $fcnvl=66451 $if spcmd .eq. 0 then fcnvl = fcnvl - 512 $zmlc=1 $! Get the database created. $! That way we can protect them all at the end. $if f$getdvi(dsk,"MNT") .nes. "TRUE" then goto fvmnu $jtauthmaint:==$gcy$sys:jtauthmaint $set noon $jtauthmaint 'dsk'[000000]corimg.sys\%PURGE $jtauthmaint 'dsk'[000000]corimg.sys\Z-X+ $jtauthmaint 'dsk'[000000]corimg.sys\%DELETE $ if strswpop .nes. "SWAP" $ then $ ask qedit "Is this disk only a nearline disk softlink destination [Y/N][N]" $if f$extract(0,1,f$edit(qedit,"upcase,collapse")) .eqs. "Y" $ then $fcnvl =65792 $goto xkyz $ endif $ endif $fvmnu: $zmenu/POINTER="-->"/SYMBOLS/initial='zmlc' ¿#6¿[1;7m Safety / SDH DISK SETUP¿[m 00:00:00 (Many sites will need at most to enter security key and then select "Done this menu".) ^ 'skfg' Enter security key for disk ^ 'fdfl' Enter file of file IDs to load for kernel marking ^ 'kmon' Examine only kernel-marked files for access tests ^ 'aufm' Set to automatically kernel-mark all files on load (This requires generating the file list at boot) ^ 'gndb' Generate filelist database and set to use it ^ 'kmal' Act as if ALL files were kernel-marked (use if most are) ^ Quit, do nothing. ^ Done this menu ^ 'ffgr' Inhibit fragmentation on this disk $zmlc=choice $if choice .eq. 7 $ then $ close/nolog cfg $ exit $ endif $if choice .eq. 9 $ then $ if ffgr .eqs. "*" $ then $ ffgr = " " $ else $ ffgr = "*" $if f$getsyi("cpu").gt.128 $ then $ write sys$output "Warning: Do NOT use this function on a Spiralog volume." $ wait 0:0:05 $ endif $ ask sifrac "Enter fraction to extend file by 1/n" $ if sifrac .nes. "" .and. f$integer(sifrac) .gt. 0 then ifrac=f$integer(sifrac) $ ask simin "Enter min. file size to adjust, blks" $ if simin .nes. "" .and. f$integer(simin) .gt. 0 then imin=f$integer(simin) $ ask simin "Enter max size to force extend by, blks" $ if simin .nes. "" .and. f$integer(simin) .gt. 0 then imax=f$integer(simin) $ endif $ goto fvmnu $ endif $if choice .eq. 1 $ then $if skfg .eqs. " " $then $ask skvl "Enter security key ( if none)" $if skvl .eqs. "" .or. f$extract(0,1,skvl) .eqs. "<" then goto xkyy $kstr="/key:"+f$edit(skvl,"upcase,collapse") $skfg="*" $xkyy: $goto fvmnu $endif $if skfg .eqs. "*" $then $skfg=" " $kstr="" $goto fvmnu $endif $endif $if choice .eq. 2 $then $fidsw = " " $fidfl=" " $ask fidfl "Enter file of file IDs to load ( if none)" $if fidfl .nes. "" .and. f$search(fidfl) .nes. "" $ then $ fidsw = "/FILENUM:"+FIDFL $ fdfl="*" $ endif $goto fvmnu $endif $if choice .eq. 3 $then $if kmon .eqs. " " $ then $ fcnvl=328593 $if spcmd .eq. 0 then fcnvl = fcnvl - 512 $ kmon="*" $ kmal=" " $ goto fvmnu $ endif $if kmon .eqs. "*" $ then $ fcnvl=66449 $if spcmd .eq. 0 then fcnvl = fcnvl - 512 $ kmon=" " $ goto fvmnu $ endif $endif $if choice .eq. 4 $ then $ if aufm .eqs. " " $ then $! Use corimg.sys, a useless file that's on all VMS volumes. $! We don't actually touch it here, but if we did it would do no harm. $ jta_listfile="" $set noon $ jtauthmaint 'dsk'[000000]corimg.sys\%LIST $ fidfl=f$edit(jta_listfile,"trim,collapse,upcase") $ fidfl=f$search(fidfl) $ ffilfl=f$extract(0,f$locate(";",fidfl),fidfl) $ if fidfl .nes. "" then fidsw="/FILENUM:"+Ffilfl $ purge 'ffilfl' $ aufm="*" $! Store the necessary command to generate the listing and the $! purge commands $ autgna="$jtauthmaint "+dsk+"[000000]corimg.sys\%LIST" $ autpga="$purge "+Ffilfl $ aufmfg="*" $ goto fvmnu $ else $ aufmfg=" " $ aufm=" " $ fidsw=" " $ fidfl=" " $ goto fvmnu $ endif $endif $if choice .eq. 5 $ then $ jta_listfile="" $set noon $ jtauthmaint 'dsk'[000000]corimg.sys\%LIST $ fidfl=f$edit(jta_listfile,"trim,collapse,upcase") $ fidfl=f$search(fidfl) $ ffilfl=f$extract(0,f$locate(";",fidfl),fidfl) $ purge 'ffilfl' $ if fidfl .nes. "" then fidsw="/FILENUM:"+Ffilfl $ gndb="*" $ goto fvmnu $endif $if choice .eq. 6 $ then $ kmal="*" $ fcnvl=99217 $if spcmd .eq. 0 then fcnvl = fcnvl - 512 $ kmon=" " $ goto fvmnu $endif $if choice .eq. 8 then goto xkyz $xkyz: $ if vmldst .ne. 0 $ then $! enter multiple destinations now $ if ndsk .eq. ndskst $ then $! This is the first disk of the bunch, so we can form our logicals here. $strdsk = " " $strdsk = dsk - ":" $ choice=1 $ zactch=" " $zdpchx: $ chcn=f$integer(choice) $ zactch = dp'chcn' $ dp'chcn' = " " $ if zactch .eqs. "*" then dp'chcn' = "I" $ choice = choice + 1 $ if choice .le. 150 then goto zdpchx $ mychcn=0 $godsks: $emit "Please select output disks" $wait 0:0:03 $zmenu/scroll/symbols sys$scratch:JTM_dsks.mnuscr $ choice = choice -1 $ if choice .eq. 0 then goto dunitso $ chcn=f$integer(choice) $ dp'chcn' = "O" $ odsk = dv'chcn' $if odsk .eqs. "" then goto dunitso $if f$getdvi(odsk,"MNT") .nes. "TRUE" $ then $ emit "%SDH-W-Notmounted Output disk must be mounted to select" $ goto godsks $ endif $! got a disk now... $ ask idsv "Give directory to place shelved files" $ if idsv .nes. "" $ then $ on error then goto godsks2 $ open/write dsvt 'odsk''idsv'test.junk $ write dsvt "test" $ close/nolog dsvt $ delete 'idsv'test.junk. $ mychcn = mychcn + 1 $ if mychcn .eq. 1 $ then $ sdelsav=odsk+idsv $ fdelsav="*" $ddmnm="sys$manager:JTM_o"+f$string(ndskst)+".oenv" $open/write d00d 'ddmnm' $write d00d "$! Define symbols we use so they aren't from the external environment." $write d00d "$set:=set" $write d00d "$set noon" $write d00d "$del*ete:=delete" $write d00d "$copy:=copy" $write d00d "$write:=write" $write d00d "$inquire:=inquire" $write d00d "$if:=if" $write d00d "$back*up:=backup" $write d00d "$sysgen:=sysgen" $write d00d "$sysman:=sysman" $write d00d "$zmenu:=zmenu" $write d00d "$ass*ign:=assign" $write d00d "$def*ine:=define" $write d00d "$close:=close" $write d00d "$open:=open" $write d00d "$read:=read" $write d00d "$gosub:=gosub" $ endif $! Need assign to device $ ndvc=dsk - ":" $ mynum=" " $ mynum=f$fao("!ZW",mychcn) $ mytst="GH"+ndvc+"GDX"+mynum $ ddddd="$ass/job "+odsk+idsv+" "+mytst $ write d00d ddddd $ goto dunitso $godsks2: $ emit "%SDH-F-Cannot write to directory given" $ wait 0:0:03 $ goto godsks $dunitso: $ close/nolog d00d $ endif $ endif $ endif $if skfg .eqs. " " then emit "%SDH-I-Nokey No security key for volume present" $if skfg .eqs. " " then emit "Note: privs/ID/base-prio cannot be altered this dsk" $strdsk = " " $strdsk = dsk - ":" $strdsk = "JTD$" + strdsk $xcmd="$if f$device(""*JTA"+f$string(ndsk)+"*"") .nes. """" then goto xldJT" $xcmd=xcmd+f$string(ndsk) $write cfg xcmd $write cfg ccmd $xyxxy="$xldJT"+f$string(ndsk)+":" $write cfg xyxxy $write sys$output " " $write sys$output " ... working ..." $foost="" $ if ffgr .eqs. "*" $ then $! add 2 to fcnvl, use ifrac, imin, imax if inhibiting fragmentation $ fcnvl = fcnvl + 2 $ foost = "/fract:"+f$string(ifrac)+"/min:"+f$string(imin)+"/max:"+f$string(imax) $ endif $CCMD="$jtdmn/fcnmsk:"+f$string(fcnvl)+foost+kstr $if ndsk .gt. ndskst then ccmd=ccmd+"/SHARE:JTA"+f$string(ndskst)+":" $if fidsw .nes. " " then ccmd=ccmd+fidsw $ccmd=ccmd + "/mode:"+f$string(gblmode) $cdcmd="$jtdmn/deas "+JTnm+" "+dsk $! Pull in globally exempt images if a listfile exists for them. $if f$search("gcy$sys:exempt.images") .nes. "" then ccmd=ccmd+"/exempt:gcy$sys:exempt.images" $ccmd=ccmd+" "+JTnm+" "+dsk $! For the first disk of a group set the command file up first. $if ndsk .eq. ndskst $then $ddmnm="sys$manager:SDH_d"+f$string(ndskst)+".daemon" $dudmnm="sys$manager:SDH_d"+f$string(ndskst)+".undo" $open/write d1d 'dudmnm' $open/write d0d 'ddmnm' $write d0d "$! Define symbols we use so they aren't from the external environment." $write d0d "$set:=set" $write d0d "$set noon" $write d0d "$del*ete:=delete" $write d0d "$copy:=copy" $write d0d "$write:=write" $write d0d "$inquire:=inquire" $write d0d "$if:=if" $write d0d "$back*up:=backup" $write d0d "$sysgen:=sysgen" $write d0d "$sysman:=sysman" $write d0d "$zmenu:=zmenu" $write d0d "$ass*ign:=assign" $write d0d "$def*ine:=define" $write d0d "$close:=close" $write d0d "$open:=open" $write d0d "$read:=read" $write d0d "$gosub:=gosub" $write d1d "$! Define symbols we use so they aren't from the external environment." $write d1d "$set:=set" $write d1d "$set noon" $write d1d "$del*ete:=delete" $write d1d "$copy:=copy" $write d1d "$write:=write" $write d1d "$inquire:=inquire" $write d1d "$if:=if" $write d1d "$back*up:=backup" $write d1d "$sysgen:=sysgen" $write d1d "$sysman:=sysman" $write d1d "$zmenu:=zmenu" $write d1d "$ass*ign:=assign" $write d1d "$def*ine:=define" $write d1d "$close:=close" $write d1d "$open:=open" $write d1d "$read:=read" $write d1d "$gosub:=gosub" $write d0d "$set comm gcy$sys:jtdmn" $! Create a new filelist from the master database every time if requested. $write d0d "$set proc/priv=all" $xddmnm="sys$manager:JTM_o"+f$string(ndskst)+".oenv" $write d0d "$define/job JTM$SWPOP ",strswpop $write d0d "$if f$search("""+xddmnm+""") .nes. """"" $write d0d "$then" $write d0d "$@"+xddmnm $write d0d "$endif" $! Create a new filelist from the master database every time if requested. $if sdelsav .nes. "" $ then $ttt="$assign/job "+sdelsav+" delsav:" $write d0d ttt $ endif $if fidsw .nes. " " .and. aufmfg .eqs. "*" $ then $! Stash commands in config file to create a new filelist at startup $! (We purge the file too.) $ write d0d "$jtauthmaint:==$gcy$sys:jtauthmaint" $ write d0d "$purge:=purge" $ write d0d autgna $ write d0d autpga $ endif $! Set up a unique process name so we can recognize it. $dddd="$set proc/name=Sf"+dsk - ":" - "_" - "_" $write d0d dddd $! Set up to create some system logicals so users can find out what $! daemons are running & controlling what disks etc. $! We will have to have a report procedure to get this information in user $! readable form also. This will be better than trolling thru startup $! files to get the information. $! We can also be sure the logicals get deleted at the end. $! First let's get something that will refer to this server $ svunq="Saf"+f$string(ndskst) $! Now we will build a logical string for various items: this process $! name, this JT unit number, this disk name, functions enabled (the $! function mask), and the PID of the server process. $! Use "svuws" as a work string $! For server n, the following logicals exist: $! Logical SAFn_SRVPRCNM is process name $! SAFn_SRVPID is process pid $! SAFn_UDSKm is disk assigned to, for mth disk of this JT server n $! SAFn_UJTm is JT unit assigned to mth disk $! SAFn_UFCNMKm is function mask for this JT unit $! SAFn_ $! SAFn_ $! fcnvl=fcnmsk used. gblmode is mode string $ svuws="$ass/sys Sf"+dsk - ":" - "_" - "_" $! Set up process name logical for the server $ svuws = svuws+" "+svunq+"_SRVPRCNM $ write d0d svuws $! Next, remember the process PID $ mypid=f$getjpi("","PID") $ svuws="$ass/sys "+mypid+" "+svunq+"_SRVPID" $ write d0d svuws $! Now store the disk we are using $ svuws="$ass/sys "+dsk+" "+svunq+"_UDSK"+f$string(ndsk) $ write d0d svuws $! Now store the JT unit number we are using likewise $ svuws="$ass/sys "+jtnm+" "+svunq+"_UJT"+f$string(ndsk) $ write d0d svuws $ svuws="$ass/sys "+f$string(fcnvl)+" "+svunq+"_UFCNMK"+f$string(ndsk) $ write d0d svuws $ svuws="$ass/sys "+f$string(gblmode)+" "+svunq+"_UGBMD"+f$string(ndsk) $ write d0d svuws $!$c00c="$jtauthmaint "+dsk+"[000000]corimg.sys\%LIST" $!$if aufm .eqs. "*" then write d0d c00c $if ignfiles .eqs. "" then ignfiles=" " $write d0d "$assign """,ignfiles,""" gcy$delexc" $savccmd=ccmd $!write d0d ccmd $! Generate deassign cmd to finish clean exits. $zzd0d="$JTdmn/deas "+JTnm+" "+dsk $write d1d zzd0d $dudc="$@"+dudmnm $sv2ccmd=dudc $!write d0d dudc $!write d0d "$logo" $sv3ccmd="$logo" $!close/nolog d0d $write cfg "$define/job JTM$SWPOP ",strswpop $write cfg "$define/sys JTM$SWPOP ",strswpop $write cfg "$rdyctr=0" $if edelsav .eqs. "*" then write cfg "$ass/sys ""Y"" gcy$delsav" $if fparan .eqs. "*" $ then $ttt="$assign/sys/exec ""OK"" GCY$PARAND" $ write cfg ttt $ttt="assign/sys/exec ""OK"" GCY$PARAND" $'ttt' $ endif $write cfg "$set noon" $write cfg "$install:==$install/command" $write cfg "$install add gcy$sys:jtdelmaint.exe/priv=cmkrnl" $write cfg "$install add gcy$sys:jtauthmaint.exe/priv=cmkrnl" $write cfg "$install add gcy$sys:jtexfix.exe/priv=cmkrnl" $write cfg "$install add gcy$sys:jtexset.exe/priv=cmkrnl" $write cfg "$set on" $write cfg "$rdeau:==run/detach/buffer_limit=64000/enqueue_limit=60/io_direct=50/prio=4/io_buffered=50/file_limit=30" $write cfg "$rdetsw:=='rdeau'/job_table_quo=1024/maximum_work=1500/page_file=15000/uic=[1,4]/subprocess_limit=10" $write cfg "$rdetsw/input=",ddmnm,"/out=sys$manager:JTM_d0.log sys$system:loginout" $!write cfg "$run/deta/auth/input=",ddmnm,"/out=sys$manager:SDH_d0.log sys$system:loginout" $! Arrange to let the daemon get started before other disks start using it. $! Test for a bit to ensure daemon comes online. Give up after 1 minute. $! (Note: preceding assumes decent memory, quotas for daemon.) $write cfg "$wtlopp:" $write cfg "$wait 0:0:15" $write cfg "$rdyctr=rdyctr+1" $write cfg "$ if (f$getdvi(""JTA",f$string(ndskst),":"",""sts"") .and. 16) .eq. 0" $write cfg "$ then" $! write d0d svuws $write cfg "$ if rdyctr .lt. 15 then goto wtlopp" $write cfg "$ endif" $write cfg "$ if (f$getdvi(""JTA",f$string(ndskst),":"",""sts"") .and. 16) .eq. 0" $write cfg "$ then" $write cfg "$ write sys$output ""%SDH-F-daemon failed to start properly""" $write cfg "$ exit 2" $write cfg "$ endif" $endif $ if ndsk.gt.ndskst $ then $ddmnm="sys$manager:SDH_d"+f$string(ndskst)+".daemon" $dudmnm="sys$manager:SDH_d"+f$string(ndskst)+".undo" $open/append d1d 'dudmnm' $!open/append d0d 'ddmnm' $! Now store the disk we are using $ svuws="$ass/sys "+dsk+" "+svunq+"_UDSK"+f$string(ndsk) $ write d0d svuws $! Now store the JT unit number we are using likewise $ svuws="$ass/sys "+jtnm+" "+svunq+"_UJT"+f$string(ndsk) $ write d0d svuws $ svuws="$ass/sys "+f$string(fcnvl)+" "+svunq+"_UFCNMK"+f$string(ndsk) $ write d0d svuws $ svuws="$ass/sys "+f$string(gblmode)+" "+svunq+"_UGBMD"+f$string(ndsk) $ write d0d svuws $ write cfg ccmd $ write d1d cdcmd $! close/nolog d0d $ close/nolog d1d $ endif $ndsk=ndsk+1 $goto getdsk $wrapup: $close/nolog d1d $write d0d savccmd $write d0d sv2ccmd $write d0d "$logo" $close/nolog d0d $copy gcy$sys:jtpurge.com sys$manager: $write cfg "$submit/after=tomorrow/noprint sys$manager:jtpurge.com" $close/nolog cfg $open/write cfg sys$manager:SDH_login.com $write cfg "$! Define symbols we use so they aren't from the external environment." $write cfg "$set:=set" $write cfg "$set noon" $write cfg "$del*ete:=delete" $write cfg "$copy:=copy" $write cfg "$write:=write" $write cfg "$inquire:=inquire" $write cfg "$if:=if" $write cfg "$back*up:=backup" $write cfg "$sysgen:=sysgen" $write cfg "$sysman:=sysman" $write cfg "$zmenu:=zmenu" $write cfg "$ass*ign:=assign" $write cfg "$def*ine:=define" $write cfg "$close:=close" $write cfg "$open:=open" $write cfg "$read:=read" $write cfg "$gosub:=gosub" $! Fullscreen security mark utility (file selection fullscreen; also marking fullscreen) $write cfg "$markSDH:==@sys$manager:jt_sel_mark" $! no fullscreen select security mark (file selection by cmd, marking fullscreen) $write cfg "$markfile:==@sys$manager:jtmark_files" $write cfg "$jtauthorize:==$gcy$sys:jtauthorize" $! Set an access password on a file $write cfg "$filepassword:==@gcy$sys:jtenter_passwords" $write cfg "$jtdolog:==$gcy$sys:jtdolog" $! Undelete files whose names contain a string $write cfg "$undelete:==@gcy$sys:jtundeluser" $! move files to secondary storage, with fullscreen select $write cfg "$moveHSm:==@sys$manager:JT_sel_move" $! move files to secondary storage, no fullscreen select of files $write cfg "$movefile:==@sys$manager:JTmove_files" $! Command to delete a file NOW with no undelete possible $write cfg "$expunge:==@gcy$sys:jtexpunge" $! Make a softlink from one file&version to another file&version $write cfg "$softl*ink:==@gcy$sys:jt_softlink" $! Report assignments or report and then allow shutdown of a server $write cfg "$JTReport:==@gcy$sys:JT_REPTACTIVE" $write cfg "$JTKillServer:==@gcy$sys:JT_REPTCTL" $fmds=f$string(gblmode) $write cfg "$define jtdel$mode ",fmds $close/nolog cfg $! Protect the SDH databases by default. $! All are created as *.GDB in GCY$CM area now. $on error then goto dunprt2 $set on $ptktl: $aaa=f$search("gcy$cm:*.gdb") $if aaa .nes. "" $ then $ jtauthmaint:==$gcy$sys:jtauthmaint $ jtauthmaint 'aaa'\I+N*<*]JTAUTHMAINT.EXE;*,*]JTDMN.EXE;*,*]JTDOLOG.EXE;*,*]JTRPLACE.EXE;*,*]BACKUP.EXE*>O<*>Q*X+Z-V $ goto ptktl $ endif $ dunprt2: $set noon $ set prot=(wo) gcy$sys:jtexfix.exe $! jxfix is run from jtauthmaint, jtdmn, nowhere else, via spawn. $! Have it protect itself since we don't know which account will be used $! $ write sys$output - "M<>[?4l[?8h",- "(B)07[?6l8" $emit "Add the line" $emit " " $EMIT " $@SYS$MANAGER:SDH_STARTUP.COM" $emit " " $emit " to your SYSTARTUP_V5.COM file now. The script can be run from" $emit " a fully privileged account now if you wish." $emit " " $emit "Add the line" $emit " " $emit " $@SYS$MANAGER:SDH_LOGIN.COM" $emit " " $EMIT " to your SYLOGIN.COM file also to define symbols needed for SDH" $emit " " $exit $gen_dsk_syms: $! generate symbols dv1 to dv150, mounted disks first $! with disk names of disks on the system. $! Fills these in with (no more disks...) message if none $n=0 $SL1: $n = n+1 $dv'n' = "(No more disks on system)" $dp'n'=" " $dq'n' = "" $if n .lt. 150 then goto SL1 $n=0 $sl2: $ n = n+1 $xsl2: $ dnm=f$device("*","DISK") $ if dnm .eqs. "" then goto sl3 $ if f$getdvi(dnm,"MNT") .nes. "TRUE" .and. dnm .nes. "" then goto xsl2 $! **** Next 2 lines omit system disks, a V1 hack to simplify testing $ dnmsyst=dnm+"[000000]VMS$COMMON.DIR" $ if f$search(dnmsyst) .nes. "" then goto xsl2 $ dv'n' = dnm $ dq'n' = f$getdvi(dnm,"volnam") $ssl2: $ if n .lt. 150 then goto sl2 $sl3: $n = n - 1 $tsl2: $ n = n+1 $xtsl2: $ dnm=f$device("*","DISK") $ if dnm .eqs. "" then goto tsl3 $ if f$getdvi(dnm,"MNT") .eqs. "TRUE" .and. dnm .nes. "" then goto xtsl2 $ dv'n' = dnm $tssl2: $ if n .lt. 150 then goto tsl2 $tsl3: $hiJT=n $return