# LDosw.ctl: Archives and Collects OSWatcher Files # $Id: LDosw.ctl,v 1.10 2015/11/13 13:38:01 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/OS/LDosw.ctl,v 1.10 2015/11/13 13:38:01 RDA Exp $ # # Change History # 20151112 JJU Change the archive identifier. =head1 NAME OS:LDosw - Archives and Collects OSWatcher Files =head1 DESCRIPTION =head2 osw - OSWatcher When available, this module archives OSWatcher files and collects the resulting C file. =cut use Limit debug ' Inside LOAD module, gathering OSWatcher information' if isUnix() {# Purge old reports and create the directory when needed call setAbbr('OS_OSW_') call purge('E','archive\.(htm|txt|zip)$',0,0,true) # Check if OSWatcher collection is disabled if ${MOD.OS.OSW.B_NO_OSW} return # Collect OSWatcher information report osw if loadFile('/tmp/osw.hb') {var @loc = getLines(0,1) if ?$osw = nvl(testDir('d',$loc[1]),\ testDir('d',catDir($loc[0],'archive'))) {var $tgt = concat(${CUR.W_ABBR},'archive') if or(${MOD.OS.OSW.R_AGE/E},compare('NE',setLimit(),'D')) {var @fil = () loop $nam (grepDir({bas=>$osw,ctx=>'RDA.LOAD.OS.OSW'},'\.dat$','dr')) {if ?testFile('f',catFile($osw,$nam)) call push(@fil,$nam) } if !@fil return call $[COL]->submit('.','PACKAGE.FILES',\ directory => $osw,\ files => [@fil],\ location => ${OUT.E},\ name => $tgt) } else call $[COL]->submit('.','PACKAGE.FILES',\ directory => $osw,\ location => ${OUT.E},\ name => $tgt) if ?testFile('s',catFile(${OUT.E},$tgt)) {write '---+ Caution' write 'This is a binary file which can be saved through the following \ link:%BR%[[../extern/',$tgt,'][OSWatcher]]' toc '2:[[',getFile(),'][rda_report][OSWatcher]]' } } } } =begin credits =over 10 =item RDA 4.5: Bob Caldwell. =item RDA 4.6: Bob Caldwell. =item RDA 8.01: Greg Cook. =back =end credits =head1 COPYRIGHT NOTICE Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. =head1 TRADEMARK NOTICE Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. =cut