# S000INI.def: Initializes the Data Collection # $Id: S000INI.def,v 2.13 2012/04/25 07:03:57 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/S000INI.def,v 2.13 2012/04/25 07:03:57 mschenke Exp $ # # Change History # 20120423 MSC Improve the credential management. =head1 NAME S000INI - Performs Data Collection Initialization =cut var $SEP = repeat('-',79) echo $SEP echo 'RDA Data Collection Started ',${RDA.LOCALTIME} echo $SEP echo tput('bold'),'Processing Initialization module ...',tput('off') # Load the common macros before calling any other libraries run library() =head1 DESCRIPTION This module does the following: =over 2 =item o Checks that the RDA engine code is not obsolete. =cut debug ' Inside INI module, testing the RDA engine code build' call testRda() =item o Performs operating system-specific initialization. =cut run &{check(getOsName(),'aix', 'OSaix',\ 'darwin', 'OSdarwin',\ 'dec_osf', 'OSosf',\ 'dynixptx', 'OSptx',\ 'hpux', 'OShpux',\ 'linux', 'OSlinux',\ 'solaris', 'OSsunos',\ cond(isCygwin(), 'OSwin32',\ isUnix(), 'OSunix',\ isVms(), 'OSvms',\ isWindows(), 'OSwin32'))}('INI') =item o Determines if output files can be produced. =cut debug ' Inside INI module, testing the report directory' if testOutput() die(last) =item o Determines if a database connection can be made. RDA performs this test only when the S200DB module has been configured. When a problem is detected, all SQL requests are disabled, but the other data collections are still performed. =cut call setSetting('LAST_INFO_S000INI') if getSetting('DATABASE_INSTALLED') {debug ' Inside INI module, testing the database connection' macro check_sqlplus {var $cmd = getSetting('SQL_COMMAND','sqlplus') if or(isVms(),isAbsolute($cmd)) return testCommand(concat($cmd,' -V')) return findCommand($cmd) } if !check_sqlplus() {call setSqlFailure(-1) call displayText('No sqlplus',true) } elsif testSql() {echo getSqlMessage() call displayText('No connection',true) if testSql() {echo tput('reverse'),last,tput('off') var $msg = getSqlMessage() call log('RDA','S000INI','DB',$msg) echo $msg call setSqlSid('') call setSetting('LAST_INFO_S000INI',$msg,'T','Database Connection error') } else echo ' Database is now running.' } } else call setSqlFailure(-1) =item o Launches parallel executions. =cut debug ' Inside INI module, launching parallel executions' if forkModules() debug ' - ',join("\012 - ",last) =back =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L =head1 COPYRIGHT NOTICE Copyright (c) 2002, 2012, 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