<sdp_diaglet platform="hpux" product="DB10R2" set="A200DB10R2_hp" title="Oracle Database 10g R2 (10.2.0) Preinstall (HP-UX)" type="A">
<sdp_meta id="$Id: A200DB10R2_hp.xml,v 2.19 2012/07/27 09:09:09 mschenke Exp $" type="version"/>
<sdp_meta author="JCR" change="Updated OS Patches checks" date="20120724" type="history"/>
<sdp_content set="A200DB10R2_hp" title="Oracle Database 10g R2 (10.2.0) Preinstall (HP-UX)" type="check">
<sdp_group>
<sdp_rule id="A00010" mode="VERIFY" name="OS Certified?">
<sdp_command type="RDA"><![CDATA[import $OS_NAM,$OS_VER,$OS_BIT,$OS_ARC
if expr('==',$OS_BIT,32)
 return setHcveResult('Only 64-bit operating systems are certified with 10g R2 \
                      RDBMS')
if !match($OS_VER,'^\d')
 return setHcveResult('OS version not determinable')
if match($OS_ARC,'itanium',true)
{call setHcveResult(check($OS_VER,\
  '^10\.20$',concat($OS_NAM,' ',$OS_VER,' is not certified with 10g R2 RDBMS'),\
  '^11\.00$',concat($OS_NAM,' ',$OS_VER,' is not certified with 10g R2 RDBMS'),\
  '^11\.11$',concat($OS_NAM,' ',$OS_VER,' is not certified with 10g R2 RDBMS'),\
  '^11\.23$','Certified with 10g R2 RDBMS',\
  '^11\.31$','Certified with 10g R2 RDBMS',\
             concat($OS_NAM,' ',$OS_VER,' is not certified with 10g R2 RDBMS')))
}
elsif match($OS_ARC,'pa-risc',true)
{call setHcveResult(check($OS_VER,\
  '^10\.20$',concat($OS_NAM,' ',$OS_VER,' is not certified with 10g R2 RDBMS'),\
  '^11\.00$','Certified with 10g R2 RDBMS',\
  '^11\.11$','Certified with 10g R2 RDBMS',\
  '^11\.23$','Certified with 10g R2 RDBMS',\
  '^11\.31$','Certified with 10g R2 RDBMS',\
             concat($OS_NAM,' ',$OS_VER,' is not certified with 10g R2 RDBMS')))
}
else
 call setHcveResult('Architecture not certified')
]]></sdp_command>
<sdp_description><![CDATA[This rule checks for the correct version of HP-UX required for installing Oracle Database 10g.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="Certified with 10g R2 RDBMS" result="PASSED"><![CDATA[The correct version of HP-UX is installed on your server.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[!!SHOWSTOPPER!!
You do not have the correct version of HP-UX installed on your server. For the certified versions of HP-UX, see the ''Oracle Database Installation Guide 10g Release 2 (10.2) for HP-UX'' and My Oracle Support.]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00020" mode="VERIFY" name="User in /etc/passwd?">
<sdp_command type="RDA"><![CDATA[call setHcveResult(cond(\
  not(testFile('r','/etc/passwd')),\
    'Can not read /etc/passwd',\
  grepFile('/etc/passwd',\
           concat('^',$usr = first(command('/usr/bin/id -nu')),':'),\
           'f'),\
    'userOK',\
    concat($usr,' not in /etc/passwd.')))
]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the user name of the user who runs this script is in the ``/etc/passwd`` file.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="userOK" result="PASSED"><![CDATA[The ``/etc/passwd`` file contains the user. No action is required.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[The ``/etc/passwd`` file does not contain the user or else the file has no read permissions. Add the user to the ``/etc/passwd`` file if the user does not exist in the file. NIS-managed users are not recommended.]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00030" mode="VERIFY" name="Group in /etc/group?">
<sdp_command type="RDA"><![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'))
]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the group to which the user belongs exists in the ``/etc/group`` file.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="GroupOK" result="PASSED"><![CDATA[The ``/etc/group`` file contains the group of the user. No action required.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[ALERT:
The ``/etc/group`` file does not contain the group. Add the group to the ``/etc/group`` file.]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00040" mode="RECORD" name="Enter ORACLE_HOME">
<sdp_command default="$ORACLE_HOME" type="PROMPT" variable="$ORACLE_HOME"><![CDATA[Planned ORACLE_HOME location]]></sdp_command>
<sdp_description><![CDATA[This rule prompts the user for the planned Oracle home directory.]]></sdp_description>
</sdp_rule>
<sdp_rule id="A00050" mode="VERIFY" name="ORACLE_HOME Valid?">
<sdp_dependencies>
<sdp_dependency condition="IS" id="A00040" minimum="PASSED|RECORD" result="FAILED"><![CDATA[Requires rule A00040.]]></sdp_dependency>
</sdp_dependencies>
<sdp_command type="RDA"><![CDATA[import $ORACLE_HOME
call setHcveResult(cond(\
  not(defined($ORACLE_HOME)),    'OHNotSpecified',\
  not(testDir('d',$ORACLE_HOME)),'OHnotvalid',\
  not(testDir('l',$ORACLE_HOME)),'OHexists',\
                                 'OHsymlink'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks for the Oracle home directory.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" maximum="N" minimum="OHexists|OHsymlink" result="PASSED"><![CDATA[The Oracle home directory exists. No action required]]></sdp_action>
<sdp_action condition="==" minimum="OHNotSpecified" result="SKIPPED"><![CDATA[No ``ORACLE_HOME`` value was provided for verification.]]></sdp_action>
<sdp_action result="FAILED" 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 this directory is created and then run this script again|
|OHsymlink|ORACLE_HOME is a symbolic link|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00060" mode="VERIFY" name="O_H Permissions OK?">
<sdp_dependencies>
<sdp_dependency condition="IS" id="A00040" minimum="PASSED|RECORD" result="FAILED"><![CDATA[Requires rule A00040.]]></sdp_dependency>
</sdp_dependencies>
<sdp_command type="RDA"><![CDATA[import $ORACLE_HOME
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'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the user has the correct privileges to install Oracle Database 10g in the Oracle home directory.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="CorrectPerms" result="PASSED"><![CDATA[The permissions for the Oracle home directory are correct. No action required.]]></sdp_action>
<sdp_action condition="==" minimum="OHNotSpecified" result="SKIPPED"><![CDATA[No ``ORACLE_HOME`` value was provided for verification.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|NoReadPerm|Ensure that the install user has read permissions for the Oracle home directory|
|NoWritePerm|Ensure that the install user has write permissions for the Oracle home directory|
|NoExecutePerm|Ensure that the install user has execute permissions 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``)|
]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id ="A00062" mode="VERIFY" name="EXTJOB User Known?">
<sdp_dependencies>
<sdp_dependency condition="IS" id="A00040" minimum="PASSED|RECORD" result="SKIPPED"><![CDATA[Requires ORACLE_HOME to retrieve the external job user]]></sdp_dependency>
</sdp_dependencies>
<sdp_command type="RDA"><![CDATA[import $ORACLE_HOME
if !?$ORACLE_HOME
 return setHcveResult('No ORACLE_HOME')
if !testDir('d',$ORACLE_HOME)
 return setHcveResult('Directory not found')
if !testFile('e',catFile($ORACLE_HOME,'rdbms','admin','externaljob.ora'))
 return setHcveResult('externaljob.ora not found')
if !grepFile(catFile($ORACLE_HOME,'rdbms','admin','externaljob.ora'),\
             '^run_user\s*=','f')
 return setHcveResult('Cannot extract the external job user')
$EXTJOB_USER = value(last)
setHcveVariable('$EXTJOB_USER')
call setHcveResult(concat('External job user is ',$EXTJOB_USER))

]]>
</sdp_command>
<sdp_description><![CDATA[This rule checks if an external job user already exists in the system.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum="^External job user is" result="PASSED"><![CDATA[The external job user has been identified.]]></sdp_action>
<sdp_action condition="=~" minimum="No ORACLE_HOME|not found" result="SKIPPED"><![CDATA[No way to retrieve the external job user]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[The ``$ORACLE_HOME\rdbms\admin\externaljob.ora`` file exists but the user cannot extract the EXTJOB user from it.]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00063" mode="RECORD" name="EXTJOB User Name">
<sdp_dependencies>
<sdp_dependency condition="IS" id="A00062" minimum="SKIPPED|FAILED" result="SKIPPED" value="Known external job user"><![CDATA[Known external job user]]></sdp_dependency>
</sdp_dependencies>
<sdp_command default="extjob" type="PROMPT" variable="$EXTJOB_USER"><![CDATA[External job user name]]></sdp_command>
<sdp_description><![CDATA[This rule asks the name for the local user used for the external jobs.]]></sdp_description>
</sdp_rule>
<sdp_rule id="A00064" mode="VERIFY" name="EXTJOB User Defined?">
<sdp_command type="RDA"><![CDATA[import $EXTJOB_USER
call setHcveResult(cond(\
  grepCommand(concat('/usr/bin/id ',$EXTJOB_USER),'\buid=','fi'),'Defined',\
                                                                 'NotFound'))
]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the EXTJOB user is present.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="Defined" result="PASSED"><![CDATA[The EXTJOB user ${`EXTJOB_USER} is found. No action is required.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[The external job user ${`EXTJOB_USER} is not found. Create the user. NIS-managed users are not recommended.]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00070" mode="VERIFY" name="Umask Set to 022?">
<sdp_command type="RDA"><![CDATA[call setHcveResult(cond(\
  expr('==','022',command('/usr/bin/umask')),'UmaskOK','UmaskNotOK'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the ``umask`` value is set correctly for installing Oracle Database 10g.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="UmaskOK" result="PASSED"><![CDATA[The ``umask`` value is set correctly for installing Oracle Database 10g. No action required.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[The ``umask`` value is not set correctly. Set the ``umask`` to 022 before installing Oracle Database 10g.]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00080" mode="VERIFY" name="LDLIBRARYPATH Unset?">
<sdp_command type="RDA"><![CDATA[call setHcveResult(cond(\
  defined(getEnv('LD_LIBRARY_PATH')),'IsSet','UnSet'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the ``LD_LIBRARY_PATH`` environment variable is not set.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="UnSet" result="PASSED"><![CDATA[The ``LD_LIBRARY_PATH`` environment variable is not set. No action required.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[The ``LD_LIBRARY_PATH`` environment variable is set in your environment and must be unset before installing Oracle Database 10g.]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00090" mode="VERIFY" name="SHLIB_PATH Unset?">
<sdp_command type="RDA"><![CDATA[call setHcveResult(cond(\
  defined(getEnv('SHLIB_PATH')),'IsSet','UnSet'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the ``SHLIB_PATH`` environment variable is not set.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="UnSet" result="PASSED"><![CDATA[The ``SHLIB_PATH`` environment variable is not set. No action required.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[The ``SHLIB_PATH`` environment variable is set in your environment and must be unset before installing Oracle Database 10g.]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00100" mode="VERIFY" name="Other O_Hs in PATH?">
<sdp_command type="RDA"><![CDATA[var @pth = split(':',getEnv('PATH'))
loop $lin (grepFile(catFile('/var','opt','oracle','oratab'),'#|^$','v'))
{var $pat = concat('^',quote(replace(field(':',1,$lin),'\/+$')),'(\/.*)?$')
 if grep(@pth,$pat)
  return setHcveResult('OratabEntryInPath')
}
call setHcveResult('NotFound')
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the PATH variable does not contain any references to other Oracle home directories based on the ``/var/opt/oracle/oratab`` entries.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="NotFound" result="PASSED"><![CDATA[The PATH does not contain any of the Oracle home directories found in the ``/var/opt/oracle/oratab`` file. No action required.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[The PATH variable contains one or more references to the Oracle home directories found in the ``/var/opt/oracle/oratab`` file. Remove these references from the PATH variable before installing Oracle Database 10g.]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00110" mode="VERIFY" name="oraInventory Permissions">
<sdp_command type="RDA"><![CDATA[call setHcveResult(cond(\
  not(testFile('f','/var/opt/oracle/oraInst.loc')),\
    'oraInventoryNotFound',\
  not(testFile('wr',$INV_LOC = \
    value(grepFile('/var/opt/oracle/oraInst.loc','^inventory_loc','f')))),\
    'oraInventoryNotOK',\
    'oraInventoryOK'))
call setHcveVariable('$INV_LOC')
]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the user who is installing Oracle Database 10g has sufficient privileges for the ``oraInventory`` directory.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" maximum="N" minimum="oraInventoryOK|oraInventoryNotFound" result="PASSED"><![CDATA[Either the user, who is logged in, has sufficient privileges for the ``oraInventory`` directory to install Oracle Database 10g or this is the first Oracle product to be installed on the system. In that case, the installer creates the ``oraInventory`` directory. No action required.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[The user, who is logged in, cannot access (write) the ``oraInventory`` directory while installing Oracle Database 10g. Verify that the user can write to the directory specified in the ``/var/opt/oracle/oraInst.loc`` file.
|*Return Value*|*Action*|
|oraInventoryNotOK|Make sure that the install user has write permissions to ${`INV_LOC}|
|oraInventoryNotFound|The ``/var/opt/oracle/oraInst.loc`` file was not found. This is not a problem if this is the first Oracle installation on the system.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00120" mode="VERIFY" name="Temp Adequate?">
<sdp_command type="RDA"><![CDATA[
var ($flg,$tmp,@tbl) = (true,{'/tmp','/tmp'})
loop $key ('TMP','TMPDIR')
{if getEnv($key)
  var $tmp->{$key} = last
}
loop $key (keys(%tmp))
{if !testDir('d',$tmp->{$key})
  call push(@tbl,concat($key,' invalidDir'))
 else
 {if !testDir('w',$tmp->{$key})
   call push(@tbl,concat($key,' NoWrite'))
  if and($flg,expr('>=',get_df($tmp->{$key}),409600))
   var $flg = false
 }
}
if $flg
{loop $key (keys(%tmp))
  call push(@tbl,concat($key,' tooSmall'))
}
call setHcveParameter('RULE.A00120',$tmp)
call setHcveVariable('$TMPDIR')
var $TMPDIR = getEnv('TMPDIR','/var/tmp')
if expr('<',get_df($TMPDIR),204800)
 call push(@tbl,concat('TMPDIR lessThan200'))
call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'TempSpaceOK'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that there is sufficient space available for storing temporary files during the Oracle Database 10g installation.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="TempSpaceOK" result="PASSED"><![CDATA[There is sufficient temporary disk space available for installing Oracle Database 10g. No action required.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[The temporary space is not configured correctly.
|*Return Value*|*Action*|
|/tmp invalidDir|ALERT - ``/tmp`` is not a valid directory. ``/tmp`` needs to be a directory.|
|/tmp NoWrite|ALERT - The user does not have write permissions to the ``/tmp`` directory.|
|/tmp tooSmall|ALERT - There is less than the needed 400 MB of free space in the ``/tmp`` directory.|
|TMP invalidDir|ALERT - ``TMP`` is set to ${`RULE.A00120.TMP} in the environment; however, ${`RULE.A00120.TMP} is an invalid directory. Take appropriate action.|
|TMP NoWrite|ALERT - ``TMP`` is set to ${`RULE.A00120.TMP} in the environment; however, the user does not have write permissions to ${`RULE.A00120.TMP}.|
|TMP tooSmall|ALERT - ``TMP`` is set to ${`RULE.A00120.TMP} in the environment; however, ${`RULE.A00120.TMP} has less than the required 400 MB of free space. Make sure your temporary space has at least 400 MB of free space.|
|TMPDIR invalidDir|ALERT - ``TMPDIR`` is set to ${`RULE.A00120.TMPDIR} in the environment; however, ${`RULE.A00120.TMPDIR} is an invalid directory. Take appropriate action.|
|TMPDIR NoWrite|ALERT - ``TMPDIR`` is set to ${`RULE.A00120.TMPDIR} in the environment; however, the user does not have write permissions to ${`RULE.A00120.TMPDIR}.|
|TMPDIR tooSmall|ALERT - ``TMPDIR`` is set to ${`RULE.A00120.TMPDIR} in the environment; however, ${`RULE.A00120.TMPDIR} has less than the required 400 MB of free space. Make sure your temporary space has at least 400 MB of free space.|
|TMPDIR lessThan200|ALERT - ${`TMPDIR} has less than the required 200 MB of free space. Make sure your ${`TMPDIR} has at least 200 MB of free space.|
Note: The ``runInstaller`` (OUI) uses or checks for temporary space by checking for the ``TEMP`` environment variable first, then the ``TMP`` environment variable, and finally the ``/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.]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00130" mode="RECORD" name="Swap (in MB)">
<sdp_command type="RDA"><![CDATA[if !testFile('x','/usr/sbin/swapinfo')
 return setHcveResult('ALERT- SWAP space cannot be determined')
var ($swp) = command('/usr/sbin/swapinfo -qm')
call setHcveResult(cond($swp,$swp,'SWAPNotSet'))
]]></sdp_command>
<sdp_description><![CDATA[This rule shows the amount of free swap space.]]></sdp_description>
</sdp_rule>
<sdp_rule id="A00140" mode="VERIFY" name="RAM (in MB)">
<sdp_command type="RDA"><![CDATA[if grepCommand('/usr/contrib/bin/machinfo','Memory\s*[=:]\s*(\d+)\s*MB','f1')
 call setHcveResult(last)
else
{var $mem = nvl(\
   field('\s+',6,grepFile('/var/adm/syslog/syslog.log','Physical','f')),\
   field('\s+',6,grepFile('/var/adm/syslog/OLDsyslog.log','Physical','f')),\
   field('\s+',1,grepCommand('/usr/sbin/dmesg','Physical:','f')),\
   cond(getSetting('NO_CSTM'),0,\
       expr('*',1024,match(grepCommand(\
         "/usr/bin/echo 'selall;info;wait;infolog;view;done' | /usr/sbin/cstm",\
         'Total Configured Memory','f'),'\:\s+(\d+)\s+MB'))),\
   0)
 call setHcveResult(expr('/',$mem,1024))
}
]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that your system has sufficient physical memory (MB) installed to install Oracle Database 10g.]]></sdp_description>
<sdp_actions>
<sdp_action condition=">=" minimum="1024" result="PASSED"><![CDATA[You have sufficient physical memory (MB) installed to install Oracle Database 10g. No action required.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[ALERT:
You do not have sufficient physical memory (MB) in your system to install Oracle Database 10g.]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00150" mode="VERIFY" name="SwapToRAM OK?">
<sdp_dependencies>
<sdp_dependency condition="IS" id="A00130" minimum="PASSED|RECORD" result="FAILED"><![CDATA[Requires rule A00130.]]></sdp_dependency>
<sdp_dependency condition="IS" id="A00140" minimum="PASSED|RECORD" result="FAILED"><![CDATA[Requires rule A00140.]]></sdp_dependency>
</sdp_dependencies>
<sdp_command type="RDA"><![CDATA[var $swp = "%A00130%"
var $mem = "%A00140%"
call setHcveResult(cond(\
  not(isNumber($swp)),                      'SwapNotDetermined',\
  expr('<',$swp,1610),                      'InsufficientSwap',\
  not(expr('>',$mem,0)),                    'MemNotDetermined',\
  and(expr('>',$mem,1024),expr('<',$mem,2048)),\
    cond(expr('<',$swp,expr('*',$mem,1.5)), 'SwapLessThanRAM','SwapToRAMOK'),\
  and(expr('>',$mem,2049),expr('<',$mem,8192)),\
    cond(expr('<',$swp,$mem),               'SwapLessThanRAM','SwapToRAMOK'),\
  expr('>',$mem,8192),\
    cond(expr('<',$swp,expr('*',$mem,0.75)),'SwapLessThanRAM','SwapToRAMOK'),\
                                            'SwapToRAMOK'))
]]></sdp_command>
<sdp_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 Installation Guide 10g Release 2 (10.2) for HP-UX''.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="SwapToRAMOK" result="PASSED"><![CDATA[The amount of swap space meets the minimum requirement for installing Oracle Database 10g. No action required.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[The amount of swap space is less than the amount recommended by the ''Oracle Database Installation Guide 10g Release 2 (10.2) for HP-UX''. 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 permissions 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.5 GB of swap space|
|MemNotDetermined|ALERT- A Swap to Memory ratio cannot be determined because you do not have execute permissions to determine the physical memory|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00160" mode="VERIFY" name="Disk Space OK?">
<sdp_dependencies>
<sdp_dependency condition="IS" id="A00040" minimum="PASSED|RECORD" result="FAILED"><![CDATA[Requires rule A00040.]]></sdp_dependency>
</sdp_dependencies>
<sdp_command type="RDA"><![CDATA[import $ORACLE_HOME
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'))
]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the amount of disk space in the Oracle home directory is sufficient for installing Oracle Database 10g.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="DiskSpaceOK" result="PASSED"><![CDATA[The Oracle home directory has sufficient disk space to install Oracle Database 10g software, create a database, and install Companion CD products. No action required.]]></sdp_action>
<sdp_action condition="==" minimum="OHNotSpecified" result="SKIPPED"><![CDATA[No ``ORACLE_HOME`` value was provided for verification.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[The Oracle home directory 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 to create a database.|
|ClientOnly|${`ORACLE_HOME} has sufficient free disk space to do 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.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00170" mode="VERIFY" name="Kernel Parameters OK?">
<sdp_dependencies>
<sdp_dependency condition="IS" id="A00140" minimum="PASSED|RECORD" result="FAILED"><![CDATA[Requires rule A00140.]]></sdp_dependency>
</sdp_dependencies>
<sdp_command type="RDA"><![CDATA[import $OS_VER
var @tbl = ()
var $KSI_ALLOC_MAX_REQD    = 32768
var $EXECUTABLE_STACK_REQD = 0
var $MAXSWAPCHUNKS_REQD    = 16384
var $MAX_THREAD_PROC_REQD  = 1024
var $MAXDSIZ_REQD          = 1073741824
var $MAXDSIZ_64BIT_REQD    = 2147483648
var $MAXSSIZ_REQD          = 134217728
var $MAXSSIZ_64BIT_REQD    = 1073741824
var $MAXUPRC_REQD          = 3686
var $MSGMAP_REQD           = 4098
var $MSGMNI_REQD           = 4096
var $MSGSEG_REQD           = 32767
var $MSGTQL_REQD           = 4096
var $NCSIZE_REQD           = 35840
var $NFILE_REQD            = 63488
var $NFLOCKS_REQD          = 4096
var $NINODE_REQD           = 34816
var $NKTHREAD_REQD         = 7184
var $NPROC_REQD            = 4096
var $SEMMNI_REQD           = 4096
var $SEMMAP_REQD           = 4098
var $SEMMNS_REQD           = 8192
var $SEMMNU_REQD           = 4092
var $SEMVMX_REQD           = 32767
var $SHMMAX_REQD           = expr('*',%A00140%,1048576)
var $SHMMNI_REQD           = 512
var $SHMSEG_REQD           = 120
var $VPS_CEILING_REQD      = 64
if !or(loadCommand('/usr/sbin/kctune'),\
       loadCommand('/usr/sbin/kmtune'),\
       loadFile('/stand/system'))
 return setHcveResult('NoAccess')
var $EXECUTABLE_STACK = field('\s+',1,grepLastFile('^executable_stack\s','f'))
var $MAXSWAPCHUNKS    = field('\s+',1,grepLastFile('^maxswapchunks\s','f'))
var $KSI_ALLOC_MAX    = field('\s+',1,grepLastFile('^ksi_alloc_max\s','f'))
var $MAX_THREAD_PROC  = field('\s+',1,grepLastFile('^max_thread_proc\s','f'))
var $MAXDSIZ          = field('\s+',1,grepLastFile('^maxdsiz\s','f'))
var $MAXDSIZ_64BIT    = field('\s+',1,grepLastFile('^maxdsiz_64bit\s','f'))
var $MAXSSIZ          = field('\s+',1,grepLastFile('^maxssiz\s','f'))
var $MAXSSIZ_64BIT    = field('\s+',1,grepLastFile('^maxssiz_64bit\s','f'))
var $MAXUPRC          = field('\s+',1,grepLastFile('^maxuprc\s','f'))
var $MSGMAP           = field('\s+',1,grepLastFile('^msgmap\s','f'))
var $MSGMNI           = field('\s+',1,grepLastFile('^msgmni\s','f'))
var $MSGSEG           = field('\s+',1,grepLastFile('^msgseg\s','f'))
var $MSGTQL           = field('\s+',1,grepLastFile('^msgtql\s','f'))
var $NCSIZE           = field('\s+',1,grepLastFile('^ncsize\s','f'))
var $NFILE            = field('\s+',1,grepLastFile('^nfile\s','f'))
var $NFLOCKS          = field('\s+',1,grepLastFile('^nflocks\s','f'))
var $NINODE           = field('\s+',1,grepLastFile('^ninode\s','f'))
var $NKTHREAD         = field('\s+',1,grepLastFile('^nkthread\s','f'))
var $NPROC            = field('\s+',1,grepLastFile('^nproc\s','f'))
var $SEMMAP           = field('\s+',1,grepLastFile('^semmap\s','f'))
var $SEMMNI           = field('\s+',1,grepLastFile('^semmni\s','f'))
var $SEMMNS           = field('\s+',1,grepLastFile('^semmns\s','f'))
var $SEMMNU           = field('\s+',1,grepLastFile('^semmnu\s','f'))
var $SEMVMX           = field('\s+',1,grepLastFile('^semvmx\s','f'))
var $SHMMAX           = field('\s+',1,grepLastFile('^shmmax\s','f'))
var $SHMMNI           = field('\s+',1,grepLastFile('^shmmni\s','f'))
var $SHMSEG           = field('\s+',1,grepLastFile('^shmseg\s','f'))
var $VPS_CEILING      = field('\s+',1,grepLastFile('^vps_ceiling\s','f'))

macro hx2dec
{var ($hex) = @arg
 var %tbl = ('0',0,'1',1,'2',2,'3',3,'4',4,'5',5,'6',6,'7',7,'8',8,'9',9,\
             'A',10,'B',11,'C',12,'D',13,'E',14,'F',15)
 var $res = 0
 loop $chr (split('',uc($hex)))
  var $res = expr('+',expr('*',$res,16),$tbl{$chr})
}

macro rpl_nam
{var ($str) = @arg

 var $cnt = 8
 while match($str,'\b([A-Za-z_]+)\b')
 {var ($nam) = last
  var $val = field('\s+',1,grepLastFile(concat('^',quote($nam),'\s'),'if'))
  var $str = replace($str,concat('\b',quote($nam),'\b'),\
                          concat('(',nvl($val, 0),')'),true)
  decr $cnt
  break !$cnt
 }
 return compute($str)
}

macro chk_min
{var (\@tbl,$nam,$ref,$val) = @arg
 if !defined($val)
 {call push(@tbl,concat('[',$nam,'] undef'))
  return
 }
 if match($val,'0x([\da-f]+)',true)
  var $val = hx2dec(last)
 if match($val,'\b[A-Za-z_]+\b')
 {var $val = rpl_nam($val)
  if !defined($val)
  {call push(@tbl,concat('[',$nam,'] too complex'))
   return
  }
 }
 if expr('<',$val,$ref)
  call push(@tbl,concat('[',$nam,'=',$val,'] too small'))
}

macro chk_max
{var (\@tbl,$nam,$ref,$val) = @arg
 if !defined($val)
 {call push(@tbl,concat('[',$nam,'] undef'))
  return
 }
 if match($val,'0x([\da-f]+)',true)
  var $val = hx2dec(last)
 if match($val,'\b[A-Za-z_]+\b')
 {var $val = rpl_nam($val)
  if !defined($val)
  {call push(@tbl,concat('[',$nam,'] too complex'))
   return
  }
 }
 if expr('>',$val,$ref)
  call push(@tbl,concat('[',$nam,'=',$val,'] too large'))
}
call chk_min(\@tbl,'KSI_ALLOC_MAX',$KSI_ALLOC_MAX_REQD,$KSI_ALLOC_MAX)
call chk_max(\@tbl,'EXECUTABLE_STACK',$EXECUTABLE_STACK_REQD,$EXECUTABLE_STACK)
call chk_min(\@tbl,'MAX_THREAD_PROC',$MAX_THREAD_PROC_REQD,$MAX_THREAD_PROC)
call chk_min(\@tbl,'MAXDSIZ',$MAXDSIZ_REQD,$MAXDSIZ)
call chk_min(\@tbl,'MAXDSIZ_64BIT',$MAXDSIZ_64BIT_REQD,$MAXDSIZ_64BIT)
call chk_min(\@tbl,'MAXSSIZ',$MAXSSIZ_REQD,$MAXSSIZ)
call chk_min(\@tbl,'MAXSSIZ_64BIT',$MAXSSIZ_64BIT_REQD,$MAXSSIZ_64BIT)
call chk_min(\@tbl,'MAXUPRC',$MAXUPRC_REQD,$MAXUPRC)
call chk_min(\@tbl,'MSGMNI',$MSGMNI_REQD,$MSGMNI)
if !match($OS_VER,'^11\.31$')
 call chk_min(\@tbl,'MSGSEG',$MSGSEG_REQD,$MSGSEG)
call chk_min(\@tbl,'MSGTQL',$MSGTQL_REQD,$MSGTQL)
call chk_min(\@tbl,'NCSIZE',$NCSIZE_REQD,$NCSIZE)
if !match($OS_VER,'^11\.31$')
 call chk_min(\@tbl,'NFILE',$NFILE_REQD,$NFILE)
call chk_min(\@tbl,'NFLOCKS',$NFLOCKS_REQD,$NFLOCKS)
call chk_min(\@tbl,'NINODE',$NINODE_REQD,$NINODE)
call chk_min(\@tbl,'NKTHREAD',$NKTHREAD_REQD,$NKTHREAD)
call chk_min(\@tbl,'NPROC',$NPROC_REQD,$NPROC)
call chk_min(\@tbl,'SEMMNI',$SEMMNI_REQD,$SEMMNI)
call chk_min(\@tbl,'SEMMNS',$SEMMNS_REQD,$SEMMNS)
call chk_min(\@tbl,'SEMMNU',$SEMMNU_REQD,$SEMMNU)
call chk_min(\@tbl,'SEMVMX',$SEMVMX_REQD,$SEMVMX)
call chk_min(\@tbl,'SHMMAX',$SHMMAX_REQD,$SHMMAX)
call chk_min(\@tbl,'SHMMNI',$SHMMNI_REQD,$SHMMNI)
call chk_min(\@tbl,'SHMSEG',$SHMSEG_REQD,$SHMSEG)
call chk_min(\@tbl,'VPS_CEILING',$VPS_CEILING_REQD,$VPS_CEILING)
if !match($OS_VER,'^(11\.23|11\.31)$')
{call chk_min(\@tbl,'SEMMAP',$SEMMAP_REQD,$SEMMAP)
 call chk_min(\@tbl,'MAXSWAPCHUNKS',$MAXSWAPCHUNKS_REQD,$MAXSWAPCHUNKS)
}
if !match($OS_VER,'^11\.31$')
 call chk_min(\@tbl,'MSGMAP',$MSGMAP_REQD,$MSGMAP)
call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'KernelOK'))
]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the kernel parameters are set according to the ''Oracle Database Installation Guide 10g Release 2 (10.2) for HP-UX''.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="KernelOK" result="PASSED" syntax="wiki"><![CDATA[The kernel parameters are set according to the ''Oracle Database Installation Guide 10g Release 2 (10.2) for HP-UX''. No action required.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[The kernel parameters are not set according to the ''Oracle Database Installation Guide 10g Release 2 (10.2) for HP-UX''. For the recommended values, see the ''Oracle Database Installation Guide 10g Release 2 (10.2) for HP-UX''.
|*Return Value*|*Action*|
|... undef|The kernel parameter is not set. Make sure that it is set.|
|... too complex|RDA cannot evaluate the expression associated with some kernel parameters.|
|... too small|The kernel parameter is set less than the minimum requirement. Refer to the following minimum parameter values:%BR%``ksi_alloc_max``=32768%BR%``executable_stack``=0%BR%``max_thread_proc``=1024%BR%``maxswapchunks``=16384%BR%``maxuprc``=3686%BR%``msgmap``=4098%BR%``msgmni``=4096%BR%``msgseg``=32767%BR%``msgtql``=4096%BR%``ncsize``=35840%BR%``nfile``=63488%BR%``nflocks``=4096%BR%``ninode``=34816%BR%``nkthread``=7184%BR%``nproc``=4096%BR%``semmap``=4098%BR%``semmni``=4096%BR%``semmns``=8192%BR%``semmnu``=4092%BR%``semvmx``=32767%BR%``shmmax``=size of RAM%BR%``shmmni``=512%BR%``shmseg``=120%BR%``vps_ceiling``=64%BR%``maxdsiz``=1073741824%BR%``maxdsiz_64bit``=2147483648%BR%``maxssiz``=134217728%BR%``maxssiz_64bit``=1073741824|
|NoAccess|You do not have access to ``/usr/sbin/kctune``, ``/usr/bin/kmtune``, or ``/stand/system``|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00175" mode="VERIFY" name="Links and Libs OK?">
<sdp_command type="RDA"><![CDATA[import $OS_VER
macro check_lib
{var (\@tbl) = @arg
 loop $fil (grepDir('/usr/lib','^libX(11|IE|ext|hp11|i|m|p|t|tst)\.sl$','p'))
 {if !testFile('r',$fil)
   call push(@tbl,concat('[',basename($fil),'] needed'))
 }
 return @tbl
}
call setHcveResult(cond(compare('eq',$OS_VER,'11.11'),\
  cond(scalar(check_lib(\@tbl)),join("\012",@tbl),'AllExist'),$OS_VER))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the OS links and libraries exist as required before the installation of Oracle Database 10g.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum="AllExist|11.23" result="PASSED"><![CDATA[All required OS libraries are found. No action required.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[Some of the required OS libraries could not be found. Refer to the following:
|*Return Value*|*Action*|
|... needed|Some libraries could not be found. Make sure that the following libraries exist in the ``/usr/lib`` directory: ``libX11.sl`` ``libXIE.sl`` ``libXext.sl`` ``libXhp11.sl`` ``libXi.sl`` ``libXm.sl`` ``libXp.sl`` ``libXt.sl`` ``libXtst.sl``|
|AllExist|All required links are present|
|11.23|11.23 does not require the links|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00180" mode="VERIFY" name="Got Software Tools?">
<sdp_command type="RDA"><![CDATA[var @tbl = ()
macro find_exe
{var (\@tbl,$exe,$ref) = @arg
 if findCommand($exe)
 {var $cmd = readLink(last,last)
  if !compare('eq',$cmd,$ref)
   call push(@tbl,concat(ucfirst($exe),'Elsewhere'))
 }
 else
  call push(@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'))
]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the required assembly tools for the installation of Oracle Database 10g exist.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="ld_nm_ar_make_found" result="PASSED"><![CDATA[All required assembly tools for the  Oracle Database 10g installation were found. No action required.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[Some of the required assembly tools for the Oracle Database 10g installation were not found. Check your installation.
|*Return Value*|*Action*|
|ArElsewhere|``ar`` is found in ``PATH`` but not in ``/usr/ccs/bin`` or symbolically linked to ``/usr/ccs/bin`` as required|
|LdElsewhere|``ld`` is found in ``PATH`` but not in ``/usr/ccs/bin`` or symbolically linked to ``/usr/ccs/bin`` as required|
|NmElsewhere|``nm`` is found in ``PATH`` but not in ``/usr/ccs/bin`` or symbolically linked to ``/usr/ccs/bin`` as required|
|MakeElsewhere|``make`` is found in ``PATH`` but not in ``/usr/ccs/bin`` or symbolically linked to ``/usr/ccs/bin`` as required|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00190" mode="VERIFY" name="ulimits OK?">
<sdp_command type="RDA"><![CDATA[var @tbl =()
macro get_ulimit_unl
{var (\@tbl,$nam) = @arg
 var $lmt = field('\s+',1,grepLastFile(concat('^',$nam,'\('),'if'))
 if !defined($lmt)
  call push(@tbl,concat($nam,'NotDefined'))
 elsif compare('ne',$lmt,'unlimited')
  call push(@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)
  call push(@tbl,concat($nam,'NotDefined'))
 elsif and(compare('ne',$lmt,'unlimited'),expr('<',$lmt,$ref))
  call push(@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_val(\@tbl,'Data',1048576)
call get_ulimit_val(\@tbl,'Stack',32768)
call get_ulimit_val(\@tbl,'Memory',2045680)
call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'ulimitOK'))
]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the ``ulimit`` settings are adequate for installing Oracle Database 10g.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="ulimitOK" result="PASSED"><![CDATA[The ``ulimit`` settings are adequate for installing Oracle Database 10g. No action required.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[Review the ``ulimit`` settings and check the recommended values from the ''Oracle Database Installation Guide 10g Release 2 (10.2) for HP-UX'' before installing the software.
|*Return Value*|*Action*|
|TimeNotDefined|ulimit(TIME) is not defined|
|TimeTooSmall|Increase the ulimit(TIME) to unlimited|
|FileNotDefined|ulimit(FILE) is not defined|
|FileTooSmall|Increase the ulimit(FILE) to unlimited|
|DataNotDefined|ulimit(DATA) is not defined|
|DataTooSmall|Increase the ulimit(DATA) to a minimum of 1048576|
|StackNotDefined|ulimit(STACK) is not defined|
|StackTooSmall|Increase the ulimit(STACK) to a minimum of 32768|
|MemoryNotDefined|ulimit(MEMORY) is not defined|
|MemoryTooSmall|Increase the ulimit(MEMORY) to a minimum of 2045680|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00200" mode="VERIFY" name="Got OS Bundles?">
<sdp_command type="RDA"><![CDATA[import $OS_VER
var $arc = uname('m')
macro check_bundle
{var ($bdl,$ref,$pat1,$pat2,$num) = @arg
 var ($fnd) = grepLastFile($bdl,'if')
 if !$fnd
  return concat($bdl,'NotFound')
 return cond(expr('>=',field($pat2,$num,field($pat1,1,$fnd)),$ref),\
             concat($bdl,'Found'),concat($bdl,'TooOld'))
}
if !loadCommand('/usr/sbin/swlist -l bundle')
 return setHcveResult('No access to /usr/sbin/swlist')
if compare('eq',$OS_VER,'11.11')
{var $msg = check_bundle('GOLDQPK11i',2004,',','\s+',1)
 if !match($msg,'GOLDQPK11iNotFound')
  call push(@tbl,$msg)
 else
 {var $msg = check_bundle('GOLDAPPS11i',2004,',','\s+',1)
  var @cmp = (@cmp,$msg)
  if !match($msg,'GOLDAPPS11iFound')
   call push(@tbl,$msg)
  var $msg = check_bundle('GOLDBASE11i',2004,',','\s+',1)
  var @cmp = (@cmp,$msg)
  if !match($msg,'GOLDBASE11iFound')
   call push(@tbl,$msg)
  if and(match($cmp[0],'GOLDAPPS11iFound'),match($cmp[1],'GOLDBASE11iFound'))
   call push(@tbl,'GOLDAPPS11iandGOLDBASE11iAdequate')
  elsif and(match($cmp[0],'GOLDAPPS11iNotFound'),\
            match($cmp[1],'GOLDBASE11iNotFound'))
   call push(@tbl,'The GOLDQPK11i is not installed and neither are the \
                     separate parts of it, GOLDAPPS11i or GOLDBASE11i')
  elsif and(match($cmp[0],'GOLDAPPS11iTooOld'),\
            match($cmp[1],'GOLDBASE11iTooOld'))
   call push(@tbl,'The GOLDQPK11i is not installed; however both \
                     GOLDAPPS11i and GOLDBASE11i are but they are too old')
  elsif and(match($cmp[0],'GOLDAPPS11iFound'),\
            match($cmp[1],'GOLDBASE11iNotFound'))
   call push(@tbl,'The GOLDQPK11i is not installed; however GOLDAPPS11i \
                     is installed but not GOLDBASE11i')
  else
   call push(@tbl,'The GOLDQPK11i is not installed; however GOLDBASE11i is \
                     installed but not GOLDAPPS11i')
 }
}
elsif and(compare('eq',$OS_VER,'11.23'),compare('eq',$arc,'ia64'))
 call push(@tbl,check_bundle('Bundle11i',0409,'\s+','\.',3))
else
 call push(@tbl,'NotChecked')
call setHcveResult(join("\012",@tbl))
]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that all required OS bundles are installed.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum="GOLDQPK11iFound|GOLDAPPS11iandGOLDBASE11iAdequate|Bundle11iFound|NotChecked" result="PASSED"><![CDATA[The required OS patch bundle is installed. No action required.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[For HP-UX 11i, install GOLDQPK11i, December 2004 or later or both GOLDAPPS11i and GOLDBASE11i, December 2004 or later. This test requires that the current user can execute ``/usr/sbin/swlist``.]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00210" mode="VERIFY" name="Got OS Patches?">
<sdp_command type="RDA"><![CDATA[import $OS_VER
macro check_patch
{var (\@tbl,$pch,@pch) = @arg
 var $pat = concat('(',join('|',$pch,@pch),')')

 if !grepLastFile($pat,'if')
  call push(@tbl,concat('[',$pch,'] not installed'))
}
var $arc = uname('m')
if !loadCommand('/usr/sbin/swlist -l fileset')
 return setHcveResult('NoAccess')
if and(match($OS_VER,'^11\.23$'),not(match($arc,'^ia64$')))
{call check_patch(\@tbl,'PHSS_31849','PHSS_31856','PHSS_32765','PHSS_33275',\
                  'PHSS_33349','PHSS_34040','PHSS_34353','PHSS_34440',\
                  'PHSS_34858','PHSS_34860','PHSS_35979','PHSS_36336',\
                  'PHSS_36342','PHSS_37201','PHSS_37492','PHSS_37947',\
                  'PHSS_38134','PHSS_39093','PHSS_39821','PHSS_40537',\
                  'PHSS_41178','PHSS_41491','PHSS_42043')
 call check_patch(\@tbl,'PHSS_31852','PHSS_31855','PHSS_33350','PHSS_34041',\
                  'PHSS_34441','PHSS_35055','PHSS_35978','PHSS_36343',\
                  'PHSS_37500','PHSS_38140','PHSS_40543','PHSS_41184')
 call check_patch(\@tbl,'PHSS_32511')
 call check_patch(\@tbl,'PHSS_32512')
 call check_patch(\@tbl,'PHSS_32513')
 call check_patch(\@tbl,'PHKL_37809')
}
elsif match($OS_VER,'^11\.11$')
{call check_patch(\@tbl,'PHNE_31097','PHNE_31929','PHNE_32477','PHNE_32811',\
                  'PHNE_33315','PHNE_33498','PHNE_33971','PHNE_34293',\
                  'PHNE_34662','PHNE_34938','PHNE_35418','PHNE_35871',\
                  'PHNE_36168','PHNE_37110','PHNE_37568','PHNE_39167',\
                  'PHNE_41023','PHNE_41973')
 call check_patch(\@tbl,'PHSS_31221','PHSS_32573','PHSS_33263','PHSS_33942',\
                  'PHSS_33944','PHSS_33945','PHSS_33946')
 call check_patch(\@tbl,'PHSS_30970','PHSS_32864','PHSS_33033','PHSS_33035',\
                  'PHSS_33037','PHSS_35379','PHSS_35381','PHSS_35383',\
                  'PHSS_35385','PHSS_37516','PHSS_37517','PHSS_38154',\
                  'PHSS_39077','PHSS_39749','PHSS_40549','PHSS_41214',\
                  'PHSS_41713','PHSS_42253')
 call check_patch(\@tbl,'PHSS_32508','PHSS_34411','PHSS_35099','PHSS_36087')
 call check_patch(\@tbl,'PHSS_32509','PHSS_34412','PHSS_35098','PHSS_36086')
 call check_patch(\@tbl,'PHSS_32510','PHSS_34413','PHSS_35100','PHSS_36088')
}
elsif and(match($OS_VER,'^11\.23$'),match($arc,'^ia64$'))
{call check_patch(\@tbl,'PHCO_32426','PHCO_41233')
 call check_patch(\@tbl,'PHKL_32646','PHKL_36103')
 call check_patch(\@tbl,'PHKL_32632','PHKL_33656','PHKL_33807','PHKL_34430',\
                  'PHKL_34907','PHKL_35926','PHKL_36749','PHKL_38364')
 call check_patch(\@tbl,'PHKL_32645','PHKL_34479','PHKL_36752','PHKL_37106',\
                  'PHKL_40615','PHKL_41571')
 call check_patch(\@tbl,'PHKL_33552','PHKL_33563','PHKL_34596','PHKL_35229',\
                  'PHKL_35552','PHKL_36667','PHKL_37653','PHKL_39436',\
                  'PHKL_39901','PHKL_40094','PHKL_41002','PHKL_41807')
 call check_patch(\@tbl,'PHSS_31850','PHSS_33353','PHSS_34044','PHSS_34444',\
                  'PHSS_36347','PHSS_40545')
 call check_patch(\@tbl,'PHSS_31851','PHSS_33352','PHSS_34043','PHSS_34854',\
                  'PHSS_34859','PHSS_36345','PHSS_37039','PHSS_37498',\
                  'PHSS_37953','PHSS_38138','PHSS_39101','PHSS_40541',\
                  'PHSS_41182','PHSS_41495')
 call check_patch(\@tbl,'PHSS_31854','PHSS_33357','PHSS_34045','PHSS_34445',\
                  'PHSS_40547','PHSS_41493')
 call check_patch(\@tbl,'PHSS_31855','PHSS_33350','PHSS_34041','PHSS_34441',\
                  'PHSS_35055','PHSS_35978','PHSS_36343','PHSS_37500',\
                  'PHSS_38140','PHSS_40543','PHSS_41184')
 call check_patch(\@tbl,'PHSS_33275','PHSS_33349','PHSS_34040','PHSS_34353',\
                  'PHSS_34440','PHSS_34858','PHSS_34860','PHSS_35979',\
                  'PHSS_36336','PHSS_36342','PHSS_37201','PHSS_37492',\
                  'PHSS_37947','PHSS_38134','PHSS_39093','PHSS_39821',\
                  'PHSS_40537','PHSS_41178','PHSS_41491','PHSS_42043')
 call check_patch(\@tbl,'PHSS_33276','PHSS_33351','PHSS_34042','PHSS_34442',\
                  'PHSS_34853','PHSS_36344','PHSS_38136','PHSS_39828',\
                  'PHSS_40539','PHSS_41180')
 call check_patch(\@tbl,'PHSS_33277')
 call check_patch(\@tbl,'PHSS_33278')
 call check_patch(\@tbl,'PHCO_31553','PHCO_32489','PHCO_33675','PHCO_34718',\
                  'PHCO_34944','PHCO_35997','PHCO_36323','PHCO_37543',\
                  'PHCO_37940','PHCO_38955','PHCO_39699','PHCO_41946')
 call check_patch(\@tbl,'PHKL_31500')
 call check_patch(\@tbl,'PHSS_32213','PHSS_32502','PHSS_34201','PHSS_35045',\
                  'PHSS_35528','PHSS_36519','PHSS_37552','PHSS_38526',\
                  'PHSS_39293','PHSS_39897','PHSS_41098','PHSS_41422',\
                  'PHSS_42738')
 call check_patch(\@tbl,'PHKL_37809')
}
elsif match($OS_VER,'^11\.31$')
{call check_patch(\@tbl,'PHKL_35900','PHKL_37452','PHKL_38174','PHKL_38275',\
                        'PHKL_38243','PHKL_38449','PHKL_38038','PHKL_38987',\
                        'PHKL_38949','PHKL_38651','PHKL_39747','PHKL_39401',\
                        'PHKL_40240','PHKL_40441','PHKL_40130','PHKL_40942',\
                        'PHKL_41005','PHKL_41355','PHKL_41588','PHKL_41362',\
                        'PHKL_41972','PHKL_41969','PHKL_42444')
 call check_patch(\@tbl,'PHKL_35936','PHKL_36241','PHKL_36242','PHKL_36872',\
                        'PHKL_37185','PHKL_37452','PHKL_38174','PHKL_38275',\
                        'PHKL_38243','PHKL_38449','PHKL_38038','PHKL_38987',\
                        'PHKL_38949','PHKL_38651','PHKL_39747','PHKL_39401',\
                        'PHKL_40240','PHKL_40441','PHKL_40130','PHKL_40942',\
                        'PHKL_41005','PHKL_41355','PHKL_41588','PHKL_41362',\
                        'PHKL_41972','PHKL_41969','PHKL_42444')
 call check_patch(\@tbl,'PHKL_36248','PHKL_37454','PHKL_38054','PHKL_38544',\
                        'PHKL_38604','PHKL_39310','PHKL_39624','PHKL_40383',\
                        'PHKL_40922','PHKL_41422')
 call check_patch(\@tbl,'PHKL_36249','PHKL_37453','PHKL_38053','PHKL_38605',\
                        'PHKL_39311','PHKL_39625','PHKL_40384','PHKL_41006',\
                        'PHKL_42515','PHKL_42752')
 call check_patch(\@tbl,'PHKL_38397','PHKL_38055','PHKL_39145','PHKL_38762',\
                        'PHKL_39351','PHKL_40208','PHKL_40207','PHKL_40941',\
                        'PHKL_40963','PHKL_41481','PHKL_41981','PHKL_42300')
}
else
 call push(@tbl,'NotCheckedUncertifiedOS')
call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'OSpatchesFound'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks for the required OS patches for the Oracle Database 10g installation.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum="OSpatchesFound|NotCheckedUncertifiedOS" result="PASSED"><![CDATA[All required OS patches are adequate. No action required.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[Some of the required OS patches were not met or found. Review the recommended OS patches from the ''Oracle Database Installation Guide 10g Release 2 (10.2) for HP-UX'' before installing the software.
|*Return Value*|*Action*|
|NoAccess|You do not have access to ``/usr/sbin/swlist``|
|... not installed|Make sure that the following patches or superseding patches are installed.%BR%
For HP-UX 11.11 platform,%SEQ%
PHNE_31097 (last known superseding patch PHNE_41973)%NEXT%
PHSS_31221 (last known superseding patch PHSS_33946)%NEXT%
PHSS_30970 (last known superseding patch PHSS_42253)%NEXT%
PHSS_32508 (last known superseding patch PHSS_36087)%NEXT%
PHSS_32509 (last known superseding patch PHSS_36086)%NEXT%
PHSS_32510 (last known superseding patch PHSS_36088)%
ENDSEQ%For HP-UX 11.23 platform,%SEQ%
PHSS_31849 (last known superseding patch PHSS_42043)%NEXT%
PHSS_31852 (last known superseding patch PHSS_41184)%NEXT%
PHSS_32511%NEXT%
PHSS_32512%NEXT%
PHSS_32513%NEXT%
PHKL_37809%ENDSEQ%
For HP-UX 11.23 Itanium platform,%SEQ%
PHCO_32426 (last known superseding patch PHCO_41233)%NEXT%
PHKL_32646 (last known superseding patch PHKL_36103)%NEXT%
PHKL_32632 (last known superseding patch PHKL_38364)%NEXT%
PHKL_32645 (last known superseding patch PHKL_41571)%NEXT%
PHKL_33552 (last known superseding patch PHKL_41807)%NEXT%
PHSS_31850 (last known superseding patch PHSS_40545)%NEXT%
PHSS_31851 (last known superseding patch PHSS_41495)%NEXT%
PHSS_31854 (last known superseding patch PHSS_41493)%NEXT%
PHSS_31855 (last known superseding patch PHSS_41184)%NEXT%
PHSS_33275 (last known superseding patch PHSS_42043)%NEXT%
PHSS_33276 (last known superseding patch PHSS_41180)%NEXT%
PHSS_33277%NEXT%
PHSS_33278%NEXT%
PHCO_31553 (last known superseding patch PHCO_41946)%NEXT%
PHKL_31500%NEXT%
PHSS_32213 (last known superseding patch PHSS_42738)%NEXT%
PHKL_37809%ENDSEQ%
For HP-UX 11.31 ,%SEQ%
PHKL_35900 (last known superseding patch PHKL_42444)%NEXT%
PHKL_35936 (last known superseding patch PHKL_42444)%NEXT%
PHKL_36248 (last known superseding patch PHKL_41422)%NEXT%
PHKL_36249 (last known superseding patch PHKL_42752)%NEXT%
PHKL_38397 (last known superseding patch PHKL_42300)%ENDSEQ%
The list of superseding patches may be incomplete and patches installed in this system may already include patches that supersede the requirements.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00220" mode="VERIFY" name="Other OUI Up?">
<sdp_command type="RDA"><![CDATA[call setHcveResult(cond(\
  grepCommand('/usr/bin/ps -ef','runInstaller','i'),'AnotherOUIup',\
                                                    'NoOtherOUI'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks for another active ``runInstaller`` process on the system.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="NoOtherOUI" result="PASSED"><![CDATA[No other ``runInstaller`` process is running. No action required.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[Stop the other instance of ``runInstaller`` that is active on your system.]]></sdp_action>
</sdp_actions>
</sdp_rule>
</sdp_group>
</sdp_content>
</sdp_diaglet>
