<!-- $Id: A200DB10_aix.xml,v 1.14 2007/11/21 16:24:37 mschenke Exp $ -->
<!-- ARCS: $Header: /home/cvs/repository/RDA_4/src/scripting/lib/hcve/A200DB10_aix.xml,v 1.14 2007/11/21 16:24:37 mschenke Exp $ -->
<!--  Change History: 20071121 DEM Modify documentation -->
<hcve name="Oracle Database 10g R1 (10.1.0)  PreInstall (AIX)" type="A" product="DB10" platform="aix">
<rule condition="==" id="10" minimum="Certified with Oracle Database 10g" mode="VERIFY" name="OS Certified?" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_NAM,$OS_LVL,$OS_BIT
var @tbl = ()
macro check_hardware
{var (\@tbl) = @arg
 import $OS_BIT,$OS_NAM,$OS_LVL
 var ($hw_bit) = command('/usr/bin/getconf HARDWARE_BITMODE')
 var @tbl = (@tbl,check(\
   $hw_bit,'^undefined$','HARDWARE_BITMODE is undefined or invalid, \
                          AIX OS is not 5.2 or 5.3',\
           cond(not(match($hw_bit,'^(64|32)$')),\
                         'HARDWARE_BITMODE check is invalid')))
 if and(expr('==',$OS_BIT,64),compare('eq',$hw_bit,'64'))
  var @tbl = (@tbl,'Certified with Oracle Database 10g')
 else
  var @tbl = (@tbl,concat(uc($OS_NAM),' ',$OS_LVL,\
                          ' is not certified with Oracle Database 10g'))
}
call check(substr(field('\-',0,$OS_LVL),0,3),\
 '^(414|415|420|421|432|433|510)$',\
       assign(@tbl,concat(uc($OS_NAM),' ',$OS_LVL,\
                          ' is not certified with Oracle Database 10g')),\
 '^(520|530)$',cond(\
     not(testFile('x','/usr/bin/getconf')),\
       assign(@tbl,'getconf command is not found'),\
       check_hardware(\@tbl)),\
 assign(@tbl,concat(uc($OS_NAM),' ','OS Version not determinable')))
call setHcveResult(join("\012",@tbl))
]]></command>
<description><![CDATA[This rule checks for the correct version of AIX required for installing Oracle Database 10g.]]></description>
<action type="negative"><![CDATA[!!SHOWSTOPPER!!
You do not have the correct version of AIX installed on your server. For the certified version of AIX, see the ''Oracle Database 10g Installation Guide for AIX'' and Oracle MetaLink.]]></action>
<action type="positive"><![CDATA[The correct version of AIX is installed on your server.]]></action>
</rule>
<rule condition="==" id="20" maximum="N" minimum="userOK" mode="VERIFY" name="User in /etc/passwd?" repeat="1" command_type="RDA">
<command><![CDATA[call setHcveResult(cond(\
  not(testFile('r','/etc/passwd')),\
    'Can not read /etc/passwd',\
  grepFile('/etc/passwd',\
           concat('^',assign($usr,command('/usr/bin/id -nu')),':'),\
           'f'),\
    'userOK',\
    concat($usr,' not in /etc/passwd.')))
]]></command>
<description><![CDATA[This rule verifies that the user name of the user who runs this script is found in the /etc/passwd file.]]></description>
<action type="negative"><![CDATA[The /etc/passwd file does not contain the user or else the file has no read permission. Add the user to the /etc/passwd file if the user does not exist in the file. NIS managed users are not recommended.]]></action>
<action type="positive"><![CDATA[The /etc/passwd file contains the user. No action is required.]]></action>
</rule>
<rule condition="==" id="30" maximum="N" minimum="GroupOK" mode="VERIFY" name="Group in /etc/group?" repeat="1" command_type="RDA">
<command><![CDATA[call setHcveResult(cond(\
  not(testFile('r','/etc/group')),\
    'Can not read /etc/group',\
  grepFile('/etc/group',concat('^',command('/usr/bin/id -ng'),':'),'f'),\
    'GroupOK',\
    'Group not in /etc/group'))
]]></command>
<description><![CDATA[This rule verifies that the group to which the user belongs exists in the /etc/group file.]]></description>
<action type="negative"><![CDATA[ALERT
The /etc/group file does not contain the group of the user. Add the group to the /etc/group file.]]></action>
<action type="positive"><![CDATA[The /etc/group file contains the group of the user. No action required.]]></action>
</rule>
<rule condition="==" id="40" minimum="$ORACLE_HOME" mode="RECORD" name="Input ORACLE_HOME" repeat="1" command_type="PROMPT">
<command><![CDATA[Planned ORACLE_HOME location or if set]]></command>
<description><![CDATA[Variable to store ORACLE_HOME entered during the execution.]]></description>
</rule>
<rule condition="=~" id="50" maximum="N" minimum="OHexists|OHsymlink|OHNotSpecified" mode="VERIFY" name="ORACLE_HOME Valid?" repeat="1" command_type="RDA">
<command><![CDATA[var $ORACLE_HOME = replaceEnv('%40%')
call setHcveResult(cond(\
  not(defined($ORACLE_HOME)),    'OHNotSpecified',\
  not(testDir('d',$ORACLE_HOME)),'OHnotvalid',\
  not(testDir('l',$ORACLE_HOME)),'OHexists',\
                                 'OHsymlink'))
]]></command>
<description><![CDATA[This rule checks for the Oracle home directory.]]></description>
<action type="negative" syntax="wiki"><![CDATA[ALERT:
There is something wrong with the Oracle home directory. Verify the following:
|*Return Value*|*Action*|
|OHnotvalid|Ensure that you provided the correct location or that the directory has been created and run this script again.|
|OHsymlink|ORACLE_HOME is a symbolic link.|
|OHNotSpecified|No ORACLE_HOME value was provided for verification.|]]></action>
<action type="positive"><![CDATA[The Oracle home directory exists. No action required.]]></action>
</rule>
<rule condition="=~" id="60" maximum="N" minimum="CorrectPerms|OHNotSpecified" mode="VERIFY" name="O_H Permissions OK?" repeat="1" command_type="RDA">
<command><![CDATA[var $ORACLE_HOME = replaceEnv('%40%')
call setHcveResult(cond(\
  not(defined($ORACLE_HOME)),    'OHNotSpecified',\
  not(testDir('d',$ORACLE_HOME)),'OHNotExist',\
  not(testDir('r',$ORACLE_HOME)),'NoReadPerm',\
  not(testDir('w',$ORACLE_HOME)),'NoWritePerm',\
  not(testDir('x',$ORACLE_HOME)),'NoExecutePerm',\
                                 'CorrectPerms'))
]]></command>
<description><![CDATA[This rule checks that the user has the correct privileges to install Oracle Database 10g in the Oracle home directory.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|NoReadPerm|Ensure that the install user has read permission for the Oracle home directory.|
|NoWritePerm|Ensure that the install user has write permission for the Oracle home directory.|
|NoExecutePerm|Ensure that the install user has execute permission for the Oracle home directory.|
|OHNotExist|The Oracle home directory does not exist. Create the Oracle home mount point and ensure that the permissions are set correctly (chmod 755).|
|OHNotSpecified|RDA cannot verify the Oracle home directory because the ORACLE_HOME is not specified.|]]></action>
<action type="positive"><![CDATA[The permissions for the Oracle home directory are correct. No action required.]]></action>
</rule>
<rule condition="==" id="70" maximum="N" minimum="UmaskOK" mode="VERIFY" name="Umask Set to 022?" repeat="1" command_type="RDA">
<command><![CDATA[call setHcveResult(cond(\
  expr('==','022',command('/usr/bin/umask')),'UmaskOK','UmaskNotOK'))
]]></command>
<description><![CDATA[This rule checks if the umask value is set correctly for installing Oracle Database 10g.]]></description>
<action type="negative"><![CDATA[The umask value is not set correctly. Set the umask to 022 before installing Oracle Database 10g. For more information, see the ''Oracle Database 10g Installation Guide for AIX''.]]></action>
<action type="positive"><![CDATA[The umask value is set correctly for installing Oracle Database 10g. No action required.]]></action>
</rule>
<rule condition="==" id="80" minimum="UnSet" mode="VERIFY" name="LDLIBRARYPATH Unset?" repeat="1" command_type="RDA">
<command><![CDATA[call setHcveResult(cond(defined(getEnv('LD_LIBRARY_PATH')),'IsSet','UnSet'))]]></command>
<description><![CDATA[This rule checks that the LD_LIBRARY_PATH environment variable is not set.]]></description>
<action type="negative"><![CDATA[The LD_LIBRARY_PATH environment variable is set in your environment and must be unset before installing Oracle Database 10g.]]></action>
<action type="positive"><![CDATA[The LD_LIBRARY_PATH environment variable is not set. No action required.]]></action>
</rule>
<rule condition="==" id="90" minimum="UnSet" mode="VERIFY" name="LIBPATH Unset?" repeat="1" command_type="RDA">
<command><![CDATA[call setHcveResult(cond(defined(getEnv('LIBPATH')),'IsSet','UnSet'))]]></command>
<description><![CDATA[This rule checks that the LIBPATH environment variable is not set.]]></description>
<action type="negative"><![CDATA[The LIBPATH environment variable is set in your environment and must be unset before installing Oracle Database 10g.]]></action>
<action type="positive"><![CDATA[The LIBPATH environment variable is not set. No action required.]]></action>
</rule>
<rule condition="==" id="100" maximum="N" minimum="NoneFound" mode="VERIFY" name="Other O_Hs in PATH?" repeat="1" command_type="RDA">
<command><![CDATA[
var @pth = split(':',getEnv('PATH'))
loop $lin (grepFile(catFile('/etc','oratab'),'#|^$','v'))
{var $pat = concat('^',quote(replace(field(':',1,$lin),'\/+$')),'(\/.*)?$')
 if grep(@pth,$pat)
  return setHcveResult('OratabEntryInPath')
}
call setHcveResult('NoneFound')
]]></command>
<description><![CDATA[This rule checks that the PATH variable does not contain any references to other Oracle home directories based on the /etc/oratab entries.]]></description>
<action type="negative"><![CDATA[The PATH variable contains one or more references to the Oracle homes found in the /etc/oratab file. Remove the references from the PATH variable before installing Oracle Database 10g.]]></action>
<action type="positive"><![CDATA[The PATH does not contain any of the Oracle homes found in the /etc/oratab file. No action required.]]></action>
</rule>
<rule condition="=~" id="110" maximum="N" minimum="oraInventoryOK|oraInventoryNotFound" mode="VERIFY" name="oraInventory Permissions" repeat="1" command_type="RDA">
<command><![CDATA[call setHcveResult(cond(\
  not(testFile('f','/etc/oraInst.loc')),\
    'oraInventoryNotFound',\
  not(testFile('wr',assign($INV_LOC,\
    value(grepFile('/etc/oraInst.loc','^inventory_loc','f'))))),\
    'oraInventoryNotOK',\
    'oraInventoryOK'))
call setHcveVariable('$INV_LOC')
]]></command>
<description><![CDATA[This rule verifies that the user installing Oracle Database 10g has sufficient privileges for the oraInventory directory.]]></description>
<action type="negative" syntax="wiki"><![CDATA[The user who currently is logged in to install Oracle Database 10g cannot access (write and read) oraInventory. Verify that the user can write to the directory specified in the /etc/oraInst.loc file.
|*Return Value*|*Action*|
|oraInventoryNotOK|Make sure the install user has write permission to ${INV_LOC}|
|oraInventoryNotFound|The /etc/oraInst.loc file was not found. This is not a problem if it is the first Oracle installation on the system.|]]></action>
<action type="positive"><![CDATA[The user who is currently logged in either has sufficient privileges for the oraInventory directory to install Oracle Database 10g or it is the first Oracle product to be installed on the system in which case the installer creates the oraInventory directory. No action required.]]></action>
</rule>
<rule condition="==" id="120" maximum="N" minimum="TempSpaceOK" mode="VERIFY" name="/tmp Adequate?" repeat="1" command_type="RDA">
<command><![CDATA[var @tbl = ()
macro check_tmp
{var (\@tbl,$dir,$siz,$nam) = @arg
 if !testDir('d',$dir)
 {var @tbl = (@tbl,'invalidDir')
  return
 }
 if expr('<',expr('/',get_df($dir),1024),$siz)
  var @tbl = (@tbl,concat($nam,'TooSmall'))
 elsif !testDir('w',$dir)
  var @tbl = (@tbl,concat($nam,'NoWrite'))
}
var $TEMP = nvl(getEnv('TEMP'),getEnv('TMP'),'/tmp')
var $TMPDIR = getEnv('TMPDIR','/var/tmp')
call setHcveVariable('$TEMP','$TMPDIR')
call check_tmp(\@tbl,$TEMP,400,'Temp')
call check_tmp(\@tbl,$TMPDIR,200,'TMPDIR')
call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'TempSpaceOK'))
]]></command>
<description><![CDATA[This rule checks if there is sufficient space available for storing temporary files during the Oracle Database 10g installation.]]></description>
<action type="negative" syntax="wiki"><![CDATA[The temp space is not configured correctly.
|*Return Value*|*Action*|
|TempTooSmall|ALERT- Your temporary space ${TEMP} has less than the required 400 MB free space. Make sure your temporary space has at least 400 MB of free space.|
|TempNoWrite|ALERT- Your temporary space ${TEMP} does not have write permissions for this user.|
|TMPDIRTooSmall|ALERT- ${TMPDIR} has less than the required 200 MB. Point the TMPDIR environment variable to a mount point with at least 200 MB of free space.|
|TMPDIRNoWrite|ALERT- TMPDIR is set in the environment; however, ${TMPDIR} does not have write permissions for this user.|
|invalidDir|ALERT- $TEMP or $TMPDIR are set in the environment with an invalid directory.|
FYI: The runInstaller (OUI) uses or checks for temporary space by checking for the TEMP environment variable first, then the TMP environment variable, and lastly the actual '/tmp' mount point.
%BR%The operating system also requires additional space by creating files under /tmp or using the TMPDIR environment variable if it finds it.]]></action>
<action type="positive"><![CDATA[There is sufficient temporary disk space available for installing Oracle Database 10g. No action required.]]></action>
</rule>
<rule id="130" maximum="N" mode="RECORD" name="Swap (in MB)" repeat="1" command_type="RDA">
<command><![CDATA[if !testFile('x','/usr/sbin/lsps')
 return setHcveResult('ALERT- SWAP space cannot be determined')
var ($swp) = match(grepCommand('/usr/sbin/lsps -s','\s*\d+MB','f'),'\s*(\d+)MB')
call setHcveResult(cond($swp,$swp,'SWAPNotSet'))
]]></command>
<description><![CDATA[This rule shows the amount of free swap space.]]></description>
</rule>
<rule condition="&gt;" id="140" minimum="511" mode="VERIFY" name="RAM (in MB)" repeat="1" command_type="RDA">
<command><![CDATA[var ($mem) = match(grepCommand(\
 "/usr/sbin/lsattr -HE -l sys0 -a realmem",'\s+\d+\s+','f'),'\s+(\d+)\s+')
call setHcveResult(cond($mem,expr('/',$mem,1024)))
]]></command>
<description><![CDATA[This rule verifies that your system has sufficient physical memory to install Oracle Database 10g.]]></description>
<action type="negative"><![CDATA[ALERT:
The amount of physical memory (Megabytes) in your system is not sufficient to install Oracle Database 10g.]]></action>
<action type="positive"><![CDATA[You have sufficient physical memory (Megabytes) installed to install Oracle Database 10g. No action required.]]></action>
</rule>
<rule condition="==" id="150" maximum="N" minimum="SwapToRAMOK" mode="VERIFY" name="SwapToRAM OK?" repeat="1" command_type="RDA">
<command><![CDATA[var $swp = "%130%"
var $mem = "%140%"
call setHcveResult(cond(not(isNumber($swp)),  'SwapNotDetermined',\
                        expr('<',$swp,1000),  'InsufficientSwap',\
                        not(expr('>',$mem,0)),'MemNotDetermined',\
                        expr('<',$swp,$mem),  'SwapLessThanRAM',\
                                              'SwapToRAMOK'))
]]></command>
<description><![CDATA[This rule verifies that the total amount of swap space is greater than or equal to the amount recommended by the ''Oracle Database 10g Installation Guide for AIX''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[The amount of swap space is less than the amount recommended by the ''Oracle Database 10g Installation Guide for AIX''. Verify the requirements and adjust your system accordingly.
|*Return Value*|*Action*|
|SwapNotDetermined|ALERT- A Swap to Memory ratio cannot be determined because swap is not set up or you do not have execute permission to determine swap.|
|SwapLessThanRAM|ALERT- Swap space is less than the physical memory. Set swap space to at least the same size as the physical memory.|
|InsufficientSwap|ALERT- Oracle Database 10g requires at least 1 GB of swap space.|
|MemNotDetermined|ALERT- A Swap to Memory ratio cannot be determined because you do not have execute permission to determine the physical memory.|]]></action>
<action type="positive"><![CDATA[The amount of swap space meets the minimum requirement for installing Oracle Database 10g. No action required.]]></action>
</rule>
<rule condition="=~" id="160" maximum="N" minimum="DiskSpaceOK|OHNotSpecified" mode="VERIFY" name="Disk Space OK?" repeat="1" command_type="RDA">
<command><![CDATA[var $ORACLE_HOME = replaceEnv('%40%')
call setHcveVariable('$ORACLE_HOME')
if !length($ORACLE_HOME)
 return setHcveResult('OHNotSpecified')
if !testDir('d',$ORACLE_HOME)
 return setHcveResult('OHNotValid')
var $dsk = expr('/',get_df($ORACLE_HOME),1024)
call setHcveResult(cond(expr('>=',$dsk,3700),'DiskSpaceOK',\
                        expr('>=',$dsk,2500),'OnlySpaceForOne',\
                        expr('>=',$dsk,1500),'ClientOnly',\
                                             'NoSpace'))
]]></command>
<description><![CDATA[This rules verifies that the amount of disk space in the Oracle home directory is sufficient for installing Oracle Database 10g.]]></description>
<action type="negative" syntax="wiki"><![CDATA[ORACLE_HOME has insufficient disk space for installing any type of Oracle Database 10g architecture. Verify the specifications.
|*Return Value*|*Action*|
|OnlySpaceForOne|${ORACLE_HOME} has sufficient free disk space to install the Oracle Database 10g software but not enough space to create a database.|
|ClientOnly|${ORACLE_HOME} has sufficient free disk space to perform a client installation only.|
|NoSpace|${ORACLE_HOME} has insufficient free disk space for an Oracle Database 10g installation.|
|OHNotValid|Disk space calculations cannot be performed because $ORACLE_HOME is not a valid directory.|]]></action>
<action type="positive"><![CDATA[ORACLE_HOME has sufficient disk space to install Oracle Database 10g software, create a database, and install Companion CD products. No action required.]]></action>
</rule>
<rule condition="==" id="170" maximum="N" minimum="AIXTHREAD_SCOPEOK" mode="VERIFY" name="AIXTHREAD_SCOPE=S?" repeat="1" command_type="RDA">
<command><![CDATA[var $env = getEnv('AIXTHREAD_SCOPE')
call setHcveResult(cond(not(defined($env)),    'AIXTHREADNotSet',\
                        compare('eq',$env,'S'),'AIXTHREAD_SCOPEOK',\
                                               'AIXTHREAD_SCOPEBad'))
]]></command>
<description><![CDATA[This rule checks if the AIXTHREAD_SCOPE environment variable is set to S.]]></description>
<action type="negative" syntax="wiki"><![CDATA[The AIXTHREAD_SCOPE environment variable is not correct.
|*Return Value*|*Action*|
|AIXTHREADNotSet|The AIXTHREAD_SCOPE environment variable should be set to S in the environment.|
|AIXTHREAD_SCOPEBad|The AIXTHREAD_SCOPE environment variable is set but not set to S. Reset the value to S in the environment.|]]></action>
<action type="positive"><![CDATA[The AIXTHREAD_SCOPE environment variable setting is correct. No action required.]]></action>
</rule>
<rule condition="==" id="175" maximum="N" minimum="LINK_CNTRLunset" mode="VERIFY" name="LINK_CNTRL is Unset?" repeat="1" command_type="RDA">
<command><![CDATA[call setHcveResult(cond(\
  defined(getEnv('LINK_CNTRL')),'LINK_CNTRLBad','LINK_CNTRLunset'))
]]></command>
<description><![CDATA[This rule checks that LINK_CNTRL is not set in the environment.]]></description>
<action type="negative"><![CDATA[The LINK_CNTRL environment variable is set in your environment. Unset it.]]></action>
<action type="positive"><![CDATA[The LINK_CNTRL environment variable setting is not set. This setting is not required for AIX 5L. No action required.]]></action>
</rule>
<rule condition="==" id="180" maximum="N" minimum="ld_nm_ar_make_found" mode="VERIFY" name="Got ld,nm,ar,make?" repeat="1" command_type="RDA">
<command><![CDATA[var @tbl = ()
macro find_exe
{var (\@tbl,$exe,$ref) = @arg
 var $cmd = findCommand($exe)
 if $cmd
 {if testFile('l',$cmd)
  {var ($lin) = command(concat('/usr/bin/ls -l ',$cmd))
   var $cmd = field('\*',0,field('\s+',10,$lin))
  }
  if !compare('eq',$cmd,$ref)
   var @tbl = (@tbl,concat(ucfirst($exe),'FoundInPath'))
 }
 else
  var @tbl = (@tbl,concat(ucfirst($exe),'Notfound'))
}
call find_exe(\@tbl,'ar','/usr/ccs/bin/ar')
call find_exe(\@tbl,'ld','/usr/ccs/bin/ld')
call find_exe(\@tbl,'nm','/usr/ccs/bin/nm')
call find_exe(\@tbl,'make','/usr/ccs/bin/make')
call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'ld_nm_ar_make_found'))
]]></command>
<description><![CDATA[This rule verifies that the required assembly tools for the installation of Oracle Database 10g exist.]]></description>
<action type="negative" syntax="wiki"><![CDATA[Some of the required assembly tools for the Oracle Database 10g installation were not found. Check your installation.
|*Return Value*|*Action*|
|ArFoundInPath|ar is found in PATH but not in /usr/ccs/bin or symbolically linked to /usr/ccs/bin as required|
|LdFoundInPath|ld is found in PATH but not in /usr/ccs/bin or symbolically linked to /usr/ccs/bin as required|
|NmFoundInPath|nm is found in PATH but not in /usr/ccs/bin or symbolically linked to /usr/ccs/bin as required|
|MakeFoundInPath|make is found in PATH but not in /usr/ccs/bin or symbolically linked to /usr/ccs/bin as required|]]></action>
<action type="positive"><![CDATA[All required assembly tools for the Oracle Database 10g installation were found. No action required.]]></action>
</rule>
<rule condition="==" id="190" maximum="N" minimum="ulimitOK" mode="VERIFY" name="ulimits OK?" repeat="1" command_type="RDA">
<command><![CDATA[var @tbl =()
macro get_ulimit_unl
{var (\@tbl,$nam) = @arg
 var $lmt = field('\s+',1,grepLastFile(concat('^',$nam),'if'))
 if !defined($lmt)
  var @tbl = (@tbl,concat($nam,'NotDefined'))
 elsif compare('ne',$lmt,'unlimited')
  var @tbl = (@tbl,concat($nam,'TooSmall'))
}
macro get_ulimit_val
{var (\@tbl,$nam,$ref) = @arg
 var $lmt = field('\s+',1,grepLastFile(concat('^',$nam,'\('),'if'))
 if !length($lmt)
  var @tbl = (@tbl,concat($nam,'NotDefined'))
 elsif and(compare('ne',$lmt,'unlimited'),expr('<',$lmt,$ref))
  var @tbl = (@tbl,concat($nam,'TooSmall'))
}
call loadCommand('/usr/bin/ulimit -a')
call get_ulimit_unl(\@tbl,'Time')
call get_ulimit_unl(\@tbl,'File')
call get_ulimit_unl(\@tbl,'Core')
call get_ulimit_val(\@tbl,'Data',1048576)
call get_ulimit_val(\@tbl,'Stack',32768)
call get_ulimit_val(\@tbl,'NoFiles',4096)
call get_ulimit_val(\@tbl,'Memory',2045680)
call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'ulimitOK'))
]]></command>
<description><![CDATA[This rule verifies that the ulimit settings are adequate for installing Oracle Database 10g.]]></description>
<action type="negative" syntax="wiki"><![CDATA[Review the ulimit settings and check the recommended values from the ''Oracle Database 10g Installation Guide for AIX'' before installing the software.
|*Return Value*|*Action*|
|TimeNotDefined|ulimit(TIME) has not been defined|
|TimeTooSmall|Increase the ulimit(TIME) to unlimited|
|FileNotDefined|ulimit(FILE) has not been defined|
|FileTooSmall|Increase the ulimit(FILE) to unlimited|
|DataNotDefined|ulimit(DATA) has not been defined|
|DataTooSmall|Increase the ulimit(DATA) to a minimum of 1048576|
|StackNotDefined|ulimit(STACK) has not been defined|
|StackTooSmall|Increase the ulimit(STACK) to a minimum of 32768|
|CoreNotDefined|ulimit(CORE) has not been defined|
|CoreTooSmall|Increase the ulimit(CORE) to unlimited|
|NoFilesNotDefined|ulimit(NOFILES) has not been defined|
|NoFilesTooSmall|Increase the ulimit(NOFILES) to a minimum of 4096|
|MemoryNotDefined|ulimit(MEMORY) has not been defined|
|MemoryTooSmall|Increase the ulimit(MEMORY) to a minimum of 2045680|]]></action>
<action type="positive"><![CDATA[The ulimit settings are adequate for installing Oracle Database 10g. No action required.]]></action>
</rule>
<rule condition="==" id="200" minimum="All required OS packages are installed" mode="VERIFY" name="Got OS Packages?" repeat="1" command_type="RDA">
<command><![CDATA[var @tbl = ()
macro check_package
{var (\@tbl) = @arg
 call loadCommand('/usr/bin/lslpp -l')
 loop $pkg ('bos.adt.base','bos.adt.lib','bos.adt.libm','bos.perf.perfstat',\
            'bos.perf.libperfstat','bos.perf.proctools')
 {var $str = field('\s+',2,grepLastFile(quote($pkg),'f'))
  if $str
  {if and(compare('ne',$str,'COMMITTED'),compare('ne',$str,'APPLIED'))
    var @tbl = (@tbl,concat('[',$pkg,'] not applied'))
  }
  else
   var @tbl = (@tbl,concat('[',$pkg,'] not installed'))
 }
}
call cond(testFile('x','/usr/bin/lslpp'),check_package(\@tbl),\
                                         assign(@tbl,'NoAccess'))
call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),\
                                     'All required OS packages are installed'))
]]></command>
<description><![CDATA[This rule verifies that all required OS packages are installed.]]></description>
<action type="negative" syntax="wiki"><![CDATA[Some of the required OS packages were not met or found. Review the recommended OS packages from the ''Oracle Database 10g Installation Guide for AIX'' before installing the software.
|*Return Value*|*Action*|
|... not installed|Install the OS package or its latest version. Refer to the following list of required OS packages: bos.adt.base, bos.adt.lib, bos.adt.libm, bos.perf.perfstat, bos.perf.proctools|
|... not applied|The package was found but is not applied or commited. Make sure that it is applied.|
|NoAccess|OS packages could not be verified because the user has no execute permission to /bin/lslpp. Provide the user with execute permission.|]]></action>
<action type="positive"><![CDATA[All required OS packages are installed. No action required.]]></action>
</rule>
<rule condition="==" id="210" minimum="PatchesFound" mode="VERIFY" name="Got OS Patches?" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_LVL
macro get_patches
{var (\@tbl) = @arg
 import $OS_LVL
 var $OS4 = field('\-',0,$OS_LVL)
 macro check_patches
 {var (\@tbl,@pch) = @arg
  loop $pch (@pch)
  {if grepCommand(concat('/usr/sbin/instfix -ik ',$pch),'no','if')
    var @tbl = (@tbl,concat('[',$pch,'] not installed'))
  }
 }
 if compare('eq',$OS4,'5200')
  call check_patches(\@tbl,'IY43980','IY44810','IY45462','IY45707','IY46214',\
                           'IY46605','IY48525','IY51801','IY59082','IY94343')
 elsif compare('eq',$OS4,'5300')
  call check_patches(\@tbl,'IY58143','IY59386','IY60930','IY94343')
}
call cond(not(testFile('x','/usr/sbin/instfix')),assign(@tbl,'NoAccess'),\
                                                 get_patches(\@tbl))
call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'PatchesFound'))
]]></command>
<description><![CDATA[This rule checks for the OS patches required for the Oracle Database 10g installation.]]></description>
<action type="negative" syntax="wiki"><![CDATA[Some of the required OS patches were not met or found. Review the recommended OS patches from the ''Oracle Database 10g Installation Guide for AIX'' before installing the software.
|*Return Value*|*Action*|
|... not installed|Install the OS patch or its latest version.%BR%5.2: IY43980, IY44810, IY45462, IY45707, IY46214 IY46605, IY48525, IY51801, IY59082 and IY94343.%BR%5.3: IY58143, IY59386, IY60930, IY94343|
|NoAccess|OS patches could not be verified because the user has no execute permission to /usr/sbin/instfix. Provide the user with execute permission.|]]></action>
<action type="positive"><![CDATA[All required OS patches are found. No action required.]]></action>
</rule>
<rule condition="==" id="220" maximum="N" minimum="NoOtherOUI" mode="VERIFY" name="Other OUI Up?" repeat="1" command_type="RDA">
<command><![CDATA[call setHcveResult(cond(\
  grepCommand('/usr/bin/ps -ef','runInstaller','i'),'AnotherOUIup',\
                                                    'NoOtherOUI'))
]]></command>
<description><![CDATA[This rule checks for another active runInstaller process on the system.]]></description>
<action type="negative"><![CDATA[Stop the other instance of runInstaller that is currently active on your system.]]></action>
<action type="positive"><![CDATA[No other runInstaller process is running currently. No action required.]]></action>
</rule>
</hcve>
