<sdp_diaglet platform="hpux" product="AS0904" set="A300AS0904_hp" title="Oracle Application Server 10g (9.0.4) Preinstall (HP-UX)" type="A">
<sdp_meta id="$Id: A300AS0904_hp.xml,v 2.11 2012/04/18 16:19:07 mschenke Exp $" type="version"/>
<sdp_meta author="JCR" change="Update Quality Pack, Temp Space, Swap Space, and Patches checks" date="20120409" type="history"/>
<sdp_content set="A300AS0904_hp" title="Oracle Application Server 10g (9.0.4) Preinstall (HP-UX)" type="check">
<sdp_group>
<sdp_rule id="A00000" mode="RECORD" name="OS">
<sdp_command type="RDA"><![CDATA[import $OS_ARC,$OS_NAM,$OS_VER,$OS_BIT
call setHcveResult(concat($OS_ARC,' ',$OS_NAM,' ',$OS_VER,' ',$OS_BIT,'-bit'))]]>
</sdp_command>
<sdp_description><![CDATA[This rule retrieves the operating system (OS) description.]]></sdp_description>
</sdp_rule>
<sdp_rule id="A00001" mode="VERIFY" name="Processor Type">
<sdp_command type="RDA"><![CDATA[import $OS_BIT
call setHcveResult(cond(\
  not(testFile('x','/bin/getconf')), 'Cannot access /bin/getconf',\
  expr('==',$OS_BIT,64),             '64-bit',\
                                     'Not a 64-bit processor'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks for the processor type. The processor must be 64-bit.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="64-bit" result="PASSED"><![CDATA[The processor is certified.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[The processor must be 64-bit.
|*Return Value*|*Action*|
|Not a 64-bit processor|Use a certified processor type.|
|Cannot access /bin/getconf|Grant execute permissions on ``/bin/getconf`` to the user who is logged in.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00002" mode="VERIFY" name="Memory in MB">
<sdp_command type="RDA"><![CDATA[var $MEM = undef
call setHcveVariable('$MEM')
if grepCommand('/usr/contrib/bin/machinfo','Memory\s*[=:]\s*(\d+)\s*MB','f1')
{var ($MEM) = last
 call setHcveResult($MEM)
}
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 retrieves the available physical memory in MB.]]></sdp_description>
<sdp_actions>
<sdp_action condition=">" minimum="0" result="PASSED"><![CDATA[No action is required.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[Make sure that the user, who is logged in, can use ``/usr/sbin/dmesg`` to get the memory size.]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00003" mode="VERIFY" name="Memory for MDR and OIM">
<sdp_command type="RDA"><![CDATA[import $MEM
call setHcveResult(cond(\
  expr('==',$MEM,0),    'Cannot determine memory',\
  expr('>=',$MEM,1000), 'Available',\
                        'Need at least 1 GB'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the system has enough memory to install the Metadata Repository (MDR) and Oracle Identity Management (OIM) install type.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="Available" result="PASSED"><![CDATA[The system has enough memory to install the Metadata Repository and Oracle Identity Management install type.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 1 GB|Increase the memory to 1 GB or more to install the Metadata Repository and Oracle Identity Management install type.|
|Cannot determine memory|Make sure that the user, who is logged in, can use ``/usr/sbin/dmesg`` to get the memory size.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00004" mode="VERIFY" name="Memory for OIM Only">
<sdp_command type="RDA"><![CDATA[import $MEM
call setHcveResult(cond(\
  expr('==',$MEM,0),   'Cannot determine memory',\
  expr('>=',$MEM,512), 'Available',\
                       'Need at least 512 MB'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the system has enough memory to install the Oracle Identity Management only install type.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="Available" result="PASSED"><![CDATA[The system has enough memory to install the Oracle Identity Management only install type.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 512 MB|Increase the memory to 512 MB or more to install the Oracle Identity Management only install type.|
|Cannot determine memory|Make sure that the user, who is logged in, can use ``/usr/sbin/dmesg`` to get the memory size.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00005" mode="VERIFY" name="Memory for MDR Only">
<sdp_command type="RDA"><![CDATA[import $MEM
call setHcveResult(cond(\
  expr('==',$MEM,0),   'Cannot determine memory',\
  expr('>=',$MEM,750), 'Available',\
                       'Need at least 750 MB'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the system has enough memory to install the Metadata Repository (MDR) only install type.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="Available" result="PASSED"><![CDATA[The system has enough memory to install the Metadata Repository only install type.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 750 MB|Increase the memory to 750 MB or more to install the Metadata Repository only install type.|
|Cannot determine memory|Make sure that the user, who is logged in, can use ``/usr/sbin/dmesg`` to get the memory size.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00006" mode="VERIFY" name="Memory for J2EE">
<sdp_command type="RDA"><![CDATA[import $MEM
call setHcveResult(cond(\
  expr('==',$MEM,0),   'Cannot determine memory',\
  expr('>=',$MEM,512), 'Available',\
                       'Need at least 512 MB'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the system has enough memory to install the J2EE and Web Cache install type.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="Available" result="PASSED"><![CDATA[The system has enough memory to install the J2EE and Web Cache install type.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 512 MB|Increase the memory to 512 MB or more to install the J2EE and Web Cache install type.|
|Cannot determine memory|Make sure that the user, who is logged in, can use ``/usr/sbin/dmesg`` to get the memory size.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00007" mode="VERIFY" name="Memory for Portal">
<sdp_command type="RDA"><![CDATA[import $MEM
call setHcveResult(cond(\
  expr('==',$MEM,0),    'Cannot determine memory',\
  expr('>=',$MEM,1000), 'Available',\
                        'Need at least 1 GB'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the system has enough memory to install the Portal and Wireless install type.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="Available" result="PASSED"><![CDATA[The system has enough memory to install the Portal and Wireless install type.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 1 GB|Increase the memory to 1 GB or more to install the Portal and Wireless install type.|
|Cannot determine memory|Make sure that the user, who is logged in, can use ``/usr/sbin/dmesg`` to get the memory size.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00008" mode="VERIFY" name="Memory for BI and Forms">
<sdp_command type="RDA"><![CDATA[import $MEM
call setHcveResult(cond(\
  expr('==',$MEM,0),    'Cannot determine memory',\
  expr('>=',$MEM,1000), 'Available',\
                        'Need at least 1 GB'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the system has enough memory to install the Business Intelligence (BI) and Forms install type.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="Available" result="PASSED"><![CDATA[The system has enough memory to install the Business Intelligence and Forms install type.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 1 GB|Increase the memory to 1 GB or more to install the Business Intelligence and Forms install type.|
|Cannot determine memory|Make sure that the user, who is logged in, can use ``/usr/sbin/dmesg`` to get the memory size.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00009" mode="VERIFY" name="Disk Space">
<sdp_command type="RDA"><![CDATA[var $ORACLE_HOME = getEnv('ORACLE_HOME')
var $DF = cond(\
  not($ORACLE_HOME),              'ORACLE_HOME is not set',\
  not(testDir('d',$ORACLE_HOME)), 'Cannot access ORACLE_HOME',\
                                  get_df($ORACLE_HOME))
call setHcveVariable('$DF')
call setHcveResult(cond(isNumber($DF),concat($DF,' KB'),$DF))
]]></sdp_command>
<sdp_description><![CDATA[This rule retrieves the available disk space in KB.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum=" KB$" result="PASSED"><![CDATA[No action is required.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|ORACLE_HOME is not set|Set the ORACLE_HOME environment variable.|
|Cannot access ORACLE_HOME|Set ORACLE_HOME to a valid directory.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00010" mode="VERIFY" name="Space for Infra">
<sdp_command type="RDA"><![CDATA[import $DF
call setHcveResult(cond(\
  not(isNumber($DF)),     $DF,\
  expr('>=',$DF,3600000), 'Available',\
                          'Need at least 3.6 GB'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the system has enough disk space to install the Infrastructure install type.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="Available" result="PASSED"><![CDATA[The system has enough disk space to install the Infrastructure install type.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 3.6 GB|Increase the available space to 3.6 GB or more to install the Infrastructure install type.|
|ORACLE_HOME is not set|Set the ORACLE_HOME environment variable.|
|Cannot access ORACLE_HOME|Set ORACLE_HOME to a valid directory.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00011" mode="VERIFY" name="Space for J2EE">
<sdp_command type="RDA"><![CDATA[import $DF
call setHcveResult(cond(\
  not(isNumber($DF)),     $DF,\
  expr('>=',$DF,1100000), 'Available',\
                          'Need at least 1.1 GB'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the system has enough disk space to install the J2EE and Web Cache install type.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="Available" result="PASSED"><![CDATA[The system has enough disk space to install the J2EE and Web Cache install type.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 1.1 GB|Increase the available space to 1.1 GB or more to install the J2EE and Web Cache install type.|
|ORACLE_HOME is not set|Set the ORACLE_HOME environment variable.|
|Cannot access ORACLE_HOME|Set ORACLE_HOME to a valid directory.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00012" mode="VERIFY" name="Space for Portal">
<sdp_command type="RDA"><![CDATA[import $DF
call setHcveResult(cond(\
  not(isNumber($DF)),     $DF,\
  expr('>=',$DF,1600000), 'Available',\
                          'Need at least 1.6 GB'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the system has enough disk space to install the Portal and Wireless install type.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="Available" result="PASSED"><![CDATA[The system has enough disk space to install the Portal and Wireless install type.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 1.6 GB|Increase the available space to 1.6 GB or more to install the Portal and Wireless install type.|
|ORACLE_HOME is not set|Set the ORACLE_HOME environment variable.|
|Cannot access ORACLE_HOME|Set ORACLE_HOME to a valid directory.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00013" mode="VERIFY" name="Space for BI and Forms">
<sdp_command type="RDA"><![CDATA[import $DF
call setHcveResult(cond(\
  not(isNumber($DF)),     $DF,\
  expr('>=',$DF,2300000), 'Available',\
                          'Need at least 2.3 GB'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the system has enough disk space to install the Business Intelligence (BI) and Forms install type.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="Available" result="PASSED"><![CDATA[The system has enough disk space to install the Business Intelligence and Forms install type.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 2.3 GB|Increase the available space to 2.3 GB or more to install the Business Intelligence and Forms install type.|
|ORACLE_HOME is not set|Set the ORACLE_HOME environment variable.|
|Cannot access ORACLE_HOME|Set ORACLE_HOME to a valid directory.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00014" mode="VERIFY" name="Space for Developer Kit">
<sdp_command type="RDA"><![CDATA[import $DF
call setHcveResult(cond(\
  not(isNumber($DF)),     $DF,\
  expr('>=',$DF,1100000), 'Available',\
                          'Need at least 1.1 GB'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the system has enough disk space to install the Developer Kit install type.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="Available" result="PASSED"><![CDATA[The system has enough disk space to install the Developer Kit install type.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 1.1 GB|Increase the available space to 1.1 GB or more to install the Developer Kit install type.|
|ORACLE_HOME is not set|Set the ORACLE_HOME environment variable.|
|Cannot access ORACLE_HOME|Set ORACLE_HOME to a valid directory.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00015" mode="VERIFY" name="Temp Space">
<sdp_command type="RDA"><![CDATA[
var ($flg,$tmp,@tbl) = (true,{'/tmp','/tmp'})
if getEnv('TMP')
 var $tmp->{'TMP'} = 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}),256000))
   var $flg = false
 }
}
if $flg
{loop $key (keys(%tmp))
  call push(@tbl,concat($key,' tooSmall'))
}
call setHcveParameter('RULE.A00015',$tmp)
call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'TempSpaceOK'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the system has enough temporary space. Oracle Universal Installer (OUI) initially checks the ``TMP`` and ``TMPDIR`` environment variables to locate the temporary directory. If these environment variables do not exist, then OUI uses ``/tmp``.]]></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 250 MB of free space in the ``/tmp`` directory.|
|TMP invalidDir|ALERT - ``TMP`` is set to ${`RULE.A00015.TMP} in the environment; however, ${`RULE.A00015.TMP} is an invalid directory. Take appropriate action.|
|TMP NoWrite|ALERT - ``TMP`` is set to ${`RULE.A00015.TMP} in the environment; however, the user does not have write permissions to ${`RULE.A00015.TMP}.|
|TMP tooSmall|ALERT - ``TMP`` is set to ${`RULE.A00015.TMP} in the environment; however, ${`RULE.A00015.TMP} has less than the required 250 MB of free space. Make sure your temporary space has at least 250 MB of free space.|
]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00016" mode="VERIFY" name="Swap Space">
<sdp_command type="RDA"><![CDATA[if !testFile('x','/usr/sbin/swapinfo')
 return setHcveResult('Cannot access /usr/sbin/swapinfo')
var ($swp) = command('/usr/sbin/swapinfo -q')
call setHcveResult(cond(expr('>=',$swp,1572864), 'Available',\
                                                 'Need at least 1.5 GB'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the system has enough swap space.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="Available" result="PASSED"><![CDATA[The system has enough swap space.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 1.5 GB|Increase the swap space to 1.5 GB or more.|
|Cannot access /usr/sbin/swapinfo|Grant execute permissions on ``/usr/sbin/swapinfo`` to the user who is logged in.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00017" mode="VERIFY" name="Monitor Colors">
<sdp_command type="RDA"><![CDATA[call loadCommand('/usr/X11R6/bin/xdpyinfo 2>&1')
var @dpt = grepLastFile('depths')
call setHcveResult(cond(\
  grep(@dpt,'8','f'),              'Adequate',\
  not(defined(getEnv('DISPLAY'))), 'DISPLAY is not set',\
  grepLastFile('unable','f'),      'Cannot open DISPLAY',\
                                   'Need at least 256 colors'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the monitor has a minimum of 256 colors.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="Adequate" result="PASSED"><![CDATA[The monitor has enough colors.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 256 colors|Use a display with 256 colors.|
|DISPLAY is not set|Set the DISPLAY environment variable to a valid display.|
|Cannot open DISPLAY|Set the DISPLAY environment variable to a correct display.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00018" mode="VERIFY" name="Operating System">
<sdp_command type="RDA"><![CDATA[import $OS_VER,$OS_BIT
call setHcveResult(cond(\
  not(match($OS_VER,'^(11\.00|11\.11)$')), 'Not Certified',\
  expr('==',$OS_BIT,64),                   'Certified',\
                                           'Need 64-bit OS'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the operating system is certified. The following operating systems are certified for Oracle Application Server 10g: HP-UX 11.0 (64-bit) and HP-UX 11i (11.11) PA-RISC or later.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="Certified" result="PASSED"><![CDATA[You are using a certified operating system.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Not Certified|You must use one of the listed certified operating systems.|
|Need 64-bit OS|You must use a 64-bit OS.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00019" mode="RECORD" name="Enter JDK Home">
<sdp_command default="" type="PROMPT" variable="$sdk"><![CDATA[JDK Home for HP-UX platform]]></sdp_command>
<sdp_description><![CDATA[This rule prompts the user for the JDK home.]]></sdp_description>
</sdp_rule>
<sdp_rule id="A00020" mode="VERIFY" name="JDK Version">
<sdp_dependencies>
<sdp_dependency condition="IS" id="A00019" minimum="RECORD" result="FAILED"><![CDATA[Requires rule A00019.]]></sdp_dependency>
</sdp_dependencies>
<sdp_command type="RDA"><![CDATA[import $sdk
if !testDir('d',$sdk)
 return setHcveResult('JDK home is missing')
var $SDK_BIN = catDir($sdk,'bin')
call setHcveVariable('$SDK_BIN')
if !testDir('d',$SDK_BIN)
 return setHcveResult('JDK bin directory is missing')
if !grepDir($SDK_BIN,'^javac$')
 return setHcveResult('JDK compiler is missing')
var $ver = field('\s+',3,\
 command(concat(catCommand($SDK_BIN,'java'),' -fullversion 2>&1')))
var $ver = trim(replace($ver,'[\-\_]','.',true),'"')
if !match($ver,'^\d+')
 call setHcveResult(concat('[',$ver,'] not verified'))
elsif and(compare('newer',$ver,'1.4.1.5'),compare('older',$ver,'1.4.2.0'))
 call setHcveResult('Adequate')
else
 call setHcveResult('Need 1.4.1.05 or later')
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the installed JDK version is JDK 1.4.1.05 or later.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="Adequate" result="PASSED"><![CDATA[The correct JDK version is installed.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need 1.4.1.05 or later|Install JDK 1.4.1.05 or later but not 1.4.2.|
|JDK bin directory is missing|Install full JDK package.|
|JDK compiler is missing|Install full JDK package.|
|... not verified|Cannot verify the version. Make sure JDK 1.4.1.05 or later but not 1.4.2 is installed.|
|JDK home is missing|Provide the correct location for JDK home.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00021" mode="VERIFY" name="Quality Pack">
<sdp_command type="RDA"><![CDATA[import $OS_VER
if !match($OS_VER,'^(11\.00|11\.11)$')
 return setHcveResult('Not Certified OS')
if !testFile('x','/usr/sbin/swlist')
 return setHcveResult('Cannot access /usr/sbin/swlist')
if match($OS_VER,'^11\.00$')
{var $ver = field('\s+',1,grepCommand('/usr/sbin/swlist','QPK','f'))
 var $ver = replace($ver,'^[^\.]*\.')
 var $res = cond(compare('valid',$ver,'11.0.58.5'),\
                 'Installed',\
                 'QPK 11.00.58.5 is missing')
}
elsif match($OS_VER,'^11\.11$')
{var $ver = field('\s+',1,grepCommand('/usr/sbin/swlist','QPK','f'))
 var $ver = replace($ver,'^[^\.]*\.')
 var $res = cond(compare('valid',$ver,'3.2.6'),\
                 'Installed',\
                 'QPK 03.02.06 is missing')
}
call setHcveResult($res)
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the Sept 2002 Quality Pack (QPK1100 B.11.00.58.5) or later is installed for HP-UX 11.0 (64-bit) or Dec 2001 Consolidate Patches (Dec01GQPK11i_Aux_Patch B.03.02.06) or later is installed for HP-UX 11i (11.11) PA-RISC or later.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="Installed" result="PASSED"><![CDATA[The correct Quality Patch is installed.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Not Certified  OS|You must use one of the listed certified operating systems.|
|Cannot access /usr/sbin/swlist|Grant execute permissions on ``/usr/sbin/swlist`` to the user who is logged in.|
|QPK 11.00.58.5 is missing|Install QPK 11.00.58.5 or later.|
|QPK 03.02.06 is missing|Install QPK 03.02.06 or later.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00022" mode="VERIFY" name="Patches">
<sdp_command type="RDA"><![CDATA[import $OS_VER
if !match($OS_VER,'^(11\.00|11\.11)$')
 return setHcveResult('Not Certified OS')
macro check_patch
{var (\@tbl,$pch,@pch) = @arg
 var $pat = concat('(',join('|',$pch,@pch),')')
 if !grepLastFile($pat,'if')
  call push(@tbl,$pch)
}
if !loadCommand('/usr/sbin/swlist -l fileset')
 return setHcveResult('NoAccess')
if match($OS_VER,'^11\.00$')
{call check_patch(\@tbl,'PHKL_27813','PHKL_27770','PHKL_28152','PHKL_28202',\
                  'PHKL_29434','PHKL_30578','PHKL_33268','PHKL_35828')
 call check_patch(\@tbl,'PHSS_26559','PHSS_28434','PHSS_28869','PHSS_30048',\
                  'PHSS_30965','PHSS_30967','PHSS_30969','PHSS_32863',\
                  'PHSS_33032','PHSS_33034','PHSS_33036','PHSS_35378',\
                  'PHSS_35380')
}
elsif match($OS_VER,'^11\.11$')
{call check_patch(\@tbl,'PHKL_25212','PHKL_30621','PHKL_40651')
 call check_patch(\@tbl,'PHKL_25506','PHKL_33457')
 call check_patch(\@tbl,'PHKL_27091','PHKL_29706','PHKL_30033','PHKL_30587',\
                  'PHKL_31993','PHKL_33328','PHKL_33336','PHKL_34310',\
                  'PHKL_35281','PHKL_36948')
 call check_patch(\@tbl,'PHKL_28267','PHKL_28428','PHKL_28990','PHKL_30158',\
                  'PHKL_30616','PHKL_31003','PHKL_32578','PHKL_32806',\
                  'PHKL_33261','PHKL_33270','PHKL_33988','PHKL_35464',\
                  'PHKL_35564','PHKL_41910')
 call check_patch(\@tbl,'PHNE_28089','PHNE_28895','PHNE_29887','PHNE_31247',\
                  'PHNE_33159','PHNE_33628','PHNE_34135','PHNE_34672',\
                  'PHNE_35183','PHNE_35351','PHNE_36125','PHNE_37671',\
                  'PHNE_37898','PHNE_38678','PHNE_39386','PHNE_42029')
 call check_patch(\@tbl,'PHSS_24638','PHSS_26946','PHSS_28880','PHSS_31221',\
                  'PHSS_32573','PHSS_33263','PHSS_33942','PHSS_33944',\
                  'PHSS_33945','PHSS_33946')
 call check_patch(\@tbl,'PHSS_26263','PHSS_26560','PHSS_28436','PHSS_28871',\
                  'PHSS_30049','PHSS_30966','PHSS_30968','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_26792')
 call check_patch(\@tbl,'PHSS_26793')
}
call setHcveResult(cond(\
  scalar(@tbl),concat('Missing [',join(' ',@tbl),']'),\
               'All patches exist'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the necessary operating system patches (or later) are installed. The required patches are as follows: %BR%For HP-UX 11.0 (64-bit): PHKL_27813 PHSS_26559.%BR%For HP-UX 11i (11.11) PA-RISC or later: PHKL_25212 PHKL_25506 PHKL_27091 PHKL_28267 PHNE_28089 PHSS_24638 PHSS_26263 PHSS_26792 PHSS_26793.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="All patches exist" result="PASSED"><![CDATA[All operating system patches are installed.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Not Certified  OS|You must use one of the listed certified operating systems.|
|NoAccess|You do not have access to /usr/sbin/swlist|
|Missing ...|Make sure that the following patches or superseding patches are installed.%BR%
For HP-UX 11.00 platform,%SEQ%
PHKL_27813 (last known superseding patch PHKL_35828)%NEXT%
PHSS_26559 (last known superseding patch PHSS_35380)%ENDSEQ%
For HP-UX 11.11 platform,%SEQ%
PHKL_25212 (last known superseding patch PHKL_40651)%NEXT%
PHKL_25506 (last known superseding patch PHKL_33457)%NEXT%
PHKL_27091 (last known superseding patch PHKL_36948)%NEXT%
PHKL_28267 (last known superseding patch PHKL_41910)%NEXT%
PHNE_28089 (last known superseding patch PHNE_42029)%NEXT%
PHSS_24638 (last known superseding patch PHSS_33946)%NEXT%
PHSS_26263 (last known superseding patch PHSS_42253)%NEXT%
PHSS_26792%NEXT%
PHSS_26793%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="A00023" mode="VERIFY" name="Motif Package">
<sdp_command type="RDA"><![CDATA[import $OS_VER
if !match($OS_VER,'^(11\.00|11\.11)$')
 return setHcveResult('Not Certified OS')
macro check_lib
{var (\@tbl,$cmd,$pat) = @arg
 import $exe
 if !grepCommand(concat($exe,$cmd),$pat,'f')
  call push(@tbl,$cmd)
}
var $exe = concat(findCommand('ls'),' -l /usr/lib/')
call check_lib(\@tbl,'libX11.sl','libX11.3')
call check_lib(\@tbl,'libXIE.sl','libXIE.2')
call check_lib(\@tbl,'libXext.sl','libXext.3')
call check_lib(\@tbl,'libXhp11.sl','libXhp11.3')
call check_lib(\@tbl,'libXi.sl','libXi.3')
call check_lib(\@tbl,'libXm.sl','libXm.4')
call check_lib(\@tbl,'libXp.sl','libXp.2')
call check_lib(\@tbl,'libXt.sl','libXt.3')
call check_lib(\@tbl,'libXtst.sl','libXtst.2')
call setHcveResult(cond(\
  scalar(@tbl),concat('Missing Motif links [',join(' ',@tbl),']'),\
               'Motif links exist'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the Motif package exists or that all Motif links exist.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" maximum="N" minimum="Motif package exists|Motif links exist" result="PASSED"><![CDATA[The Motif package exists or all Motif links exist.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Actions*|
|Not Certified  OS|You must use one of the listed certified operating systems.|
|Missing Motif links ...|Install the Motif 2.1 Development Environment package X11MotifDevKit.MOTIF21-PRG:B.11.00.01 for HP-UX 11.0 (64-bit) or the Motif 2.1 Development Environment (X11MotifDevKit.MOTIF21-PRG) B.11.11.01 for HP-UX 11i (11.11) PA-RISC or later.%BR%or%BR%Make sure that the following symbolic links exist: libX11.sl -&gt; llibX11.3, libXIE.sl -&gt; libXIE.2, libXext.sl -&gt; libXext.3, libXhp11.sl -&gt; libXhp11.3, libXi.sl -&gt; libXi.3, libXm.sl -&gt; libXm.4, libXp.sl -&gt; libXp.2, libXt.sl -&gt; libXt.3 and libXtst.sl -&gt; libXtst.2|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00024" mode="VERIFY" name="Kernel Parameters">
<sdp_command type="RDA"><![CDATA[import $OS_VER
if !match($OS_VER,'^(11\.00|11\.11)$')
 return setHcveResult('Not Certified OS')
if !loadFile('/stand/system')
 return setHcveResult('NoAccess')

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)),'fi'))
  var $str = replace($str,concat('\b',quote($nam),'\b'),\
                          concat('(',nvl($val, 0),')'),true)
  decr $cnt
  break !$cnt
 }
 return compute($str)
}

loop $par ('ksi_alloc_max=16384|(nproc*8)',\
           'max_thread_proc=3000',\
           'maxdsiz=2063835136',\
           'maxdsiz_64bit=2147483648',\
           'maxfiles=2048',\
           'maxfiles_lim=2048',\
           'maxssiz=134217728',\
           'maxssiz_64bit=1073741824',\
           'maxswapchunks=16384',\
           'maxuprc=1843|((nproc*9)/10)',\
           'maxusers=512',\
           'msgmap=4098|(2+msgmni)',\
           'msgmni=4096',\
           'msgseg=32767',\
           'msgtql=4096',\
           'ncallout=6000',\
           'ncsize=22528|((8*nproc+2048)+vx_ncsize)',\
           'nfile=3000',\
           'nflocks=4096',\
           'ninode=18432|(8*nproc+2048)',\
           'nkthread=6000',\
           'nproc=2048',\
           'semmap=4098|(semmni+2)',\
           'semmni=4096',\
           'semmns=8192|(semmni*2)',\
           'semmnu=2044|(nproc-4)',\
           'semvmx=32767',\
           'shmmni=512',\
           'shmseg=32',\
           'tcp_conn_request_max=2048',\
           'vps_ceiling=64')
{var ($nam,$val) = split('=',$par,2)
 var ($val,$exp) = split('\|',$val,2)
 var $cur = field('\s+',1,grepLastFile(concat('^',quote($nam)),'fi'))
 if !length($cur)
  call push(@tbl,concat('[',$nam,'] undef'))
 else
 {if match($cur,'^0X',true)
   var $cur = hx2dec($cur)
  if match($cur,'\b[A-Za-z_]+\b')
  {var $cur = rpl_nam($cur)
   if !length($cur)
   {call push(@tbl,concat('[',$nam,'] too complex'))
    next
   }
  }
  if expr('<',$cur,$val)
   call push(@tbl,concat('[',$nam,'=',$cur,'] too small'))
 }
}
call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'All Set'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the kernel parameters are set either to the formula or to values greater than or equal to the recommended values. The recommended formula/values are as follows:
ksi_alloc_max=(nproc*8)|16384,
max_thread_proc=3000,
maxdsiz=2063835136,
maxdsiz_64bit=2147483648,
maxfiles=2048,
maxfiles_lim=2048,
maxssiz=134217728,
maxssiz_64bit=1073741824,
maxswapchunks=16384,
maxuprc=((nproc*9)/10)|1843,
maxusers=512,
msgmap=(2+msgmni)|4098,
msgmni=4096,
msgseg=32767,
msgtql=4096,
ncallout=6000,
ncsize=((8*nproc+2048)+vx_ncsize)|22528,
nfile=3000,
nflocks=4096,
ninode=(8*nproc+2048)|18432,
nkthread=6000,
nproc=2048,
semmap=(semmni+2)|4098,
semmni=4096,
semmns=(semmni*2)|8192,
semmnu=(nproc-4)|2044,
semvmx=32767,
shmmax=Physical Memory, shmmni=512, shmseg=32,
tcp_conn_request_max=2048 and
vps_ceiling=64]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="All Set" result="PASSED"><![CDATA[All kernel parameters are set correctly.]]></sdp_action>
<sdp_action condition="==" minimum="NoAccess" result="FAILED"><![CDATA[You do not have access to ``/stand/system``.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Not Certified OS|You must use one of the listed certified operating systems.|
|... undef|Some kernel parameters are not set. Ensure they are set.|
|... too complex|RDA cannot evaluate the expression associated with some kernel parameters.|
|... too small|Set the value of the kernel parameters listed to the correct value of the formula.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00025" mode="VERIFY" name="Port 1521">
<sdp_command type="RDA"><![CDATA[var @lst = grepCommand('/bin/netstat -an','LISTEN')
if !grep(@lst,'1521','f')
 return setHcveResult('Free')
if testFile('x','/usr/sbin/lsof')
 var ($prc) = grepCommand('/usr/sbin/lsof -i TCP:1521','LIST','f')
elsif testFile('x','/usr/bin/lsof')
 var ($prc) = \
   grepCommand('/usr/bin/lsof -i TCP:1521','LIST','f')
elsif testFile('x','/usr/local/bin/lsof')
 var ($prc) = \
   grepCommand('/usr/local/bin/lsof -i TCP:1521','LIST','f')
else
 return setHcveResult('Cannot use lsof')
if !length($prc)
 return setHcveResult('Cannot use lsof')
macro chk_tns
{var ($prc) = @arg
 var @cmd = grepCommand('ps -ef',field('\s+',1,$prc))
 var @ver = command(replace(field(\
    '\s+',8,grep(@cmd,'tnslsnr','f')),'tnslsnr','lsnrctl version'))
 var $ver = field('\s+',4,grep(@ver,'LSNRCTL','f'))
 return cond(compare('older',$ver,'9.0.1'),\
             concat('TNS Listener version [',$ver,'] is running'),\
             'TNS Listener 9.0.1 or later is running')
}
call setHcveResult(cond(not(match(field('\s+',0,$prc),'tnslsnr',true)),\
                        'Port is used by non-Oracle program',\
                        chk_tns($prc)))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that port 1521 is free. If an Oracle listener version 9.0.1 or later uses port 1521, then the existing database and the Oracle Application Server 10g Metadata Repository will use the existing listener. The installer performs this configuration automatically. If an Oracle listener version earlier than 9.0.1 uses port 1521, then the existing listener must be stopped. After the installation is complete, you can configure the new 9.0.1 listener to listen to the existing (pre 9.0.1) databases. If non-Oracle programs use port 1521, then this program must be configured to listen to ports other than 1521. For more information, see the "If Port 1521 is in Use" section of the ''Oracle Application Server 10g Installation Guide''.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" maximum="N" minimum="TNS Listener 9.0.1 or later is running|Free" result="PASSED"><![CDATA[Port 1521 is not used or is used by TNS Listener version 9.0.1 or later.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|TNS Listener version ... is running|Stop the existing listener.|
|Port is used by non-Oracle program|Reconfigure the program to use a different port than 1521.|
|Cannot use lsof|Check the port 1521 manually.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00026" mode="VERIFY" name="Environment Variables">
<sdp_command type="RDA"><![CDATA[if grepEnv('^(TNS_ADMIN|ORA_NLS|ORA_NLS32|ORA_NLS33)$')
 return setHcveResult('Some variables are set')
if testFile('e','/etc/oratab')
{if !testFile('r','/etc/oratab')
  return setHcveResult('Cannot access /etc/oratab')
 var @pth = (split(':',join(':',getEnv('PATH'),\
                                getEnv('CLASSPATH'),\
                                getEnv('LD_LIBRARY_PATH'))))
 loop $lin (grepFile('/etc/oratab','#|^$','v'))
 {var $pat = concat('^',quote(replace(field(':',1,$lin),'\/+$')),'(\/.*)?$')
  if grep(@pth,$pat)
   return setHcveResult('Variables containing reference to existing \
                         Oracle homes')
 }
}
return setHcveResult('Properly defined')
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the following environment variables are not set: ``TNS_ADMIN``, ``ORA_NLS``, ``ORA_NLS32``, and ``ORA_NLS33``. In addition, the following environment variables must not reference any existing Oracle home, ``PATH``, ``CLASSPATH``, and ``LD_LIBRARY_PATH``.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" maximum="N" minimum="Properly defined" result="PASSED"><![CDATA[Environment variables do not have references to existing Oracle home directories.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Variables containing reference to existing Oracle homes|Remove any reference to existing Oracle home directories from ``PATH``, ``CLASSPATH``, and ``LD_LIBRARY_PATH``.|
|Some variables are set|Unset ``TNS_ADMIN``, ``ORA_NLS``, ``ORA_NLS32``, and ``ORA_NLS33``.|
|Cannot access /etc/oratab|Grant read permissions on ``/etc/oratab`` to the user who is logged in.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00027" mode="RECORD" name="Domain Name">
<sdp_command type="RDA"><![CDATA[var ($hst) = command('hostname')
var ($nam,$dom) = split('\.',$hst,2)
if testFile('x','/bin/domainname')
 var ($nis) = command('/bin/domainname')
if testFile('r','/etc/resolv.conf')
 var $dns = field('\s+',1,grepFile('/etc/resolv.conf','domain'))
if testFile('x','/bin/nslookup')
{if $nam
 {var $nsl = field(concat(quote($nam),'\.'),1,\
                  grepCommand(concat('/bin/nslookup ',$hst),'Name','f'))
 }
 else
 {var $nsl = field(concat(quote($hst),'\.'),1,\
                  grepCommand(concat('/bin/nslookup ',$hst),'Name','f'))
 }
}
call setHcveResult(cond($dom,$dom,\
                        $nis,$nis,\
                        $dns,$dns,\
                        $nsl,$nsl,\
                             'NotFound'))
]]></sdp_command>
<sdp_description><![CDATA[This rule gets the host domain name.]]></sdp_description>
</sdp_rule>
<sdp_rule id="A00028" mode="RECORD" name="IP address">
<sdp_command type="RDA"><![CDATA[var ($hst) = command('hostname')
var $ip = field('\s+',3,\
 grepCommand(concat('/usr/sbin/ping ',$hst,' -n 1'),'\s(\d+\.\d+\.)+','f'))
call setHcveResult(replace($ip,':'))
]]></sdp_command>
<sdp_description><![CDATA[This rule gets the host IP address.]]></sdp_description>
</sdp_rule>
<sdp_rule id="A00029" mode="VERIFY" name="DNS Lookup">
<sdp_dependencies>
<sdp_dependency condition="IS" id="A00028" minimum="RECORD" result="FAILED"><![CDATA[Requires rule A00028.]]></sdp_dependency>
</sdp_dependencies>
<sdp_command type="RDA"><![CDATA[var $ip  = "%A00028%"
var $hst = field('\.',0,command('hostname'))
call setHcveResult(cond(\
  not(length($ip)),\
    'Cannot determine IP address',\
  not(testFile('x','/bin/nslookup')),\
    'Cannot access /bin/nslookup',\
  and(grepCommand(concat('/bin/nslookup ',$hst),quote($ip),'f'),\
      grepCommand(concat('/bin/nslookup ',$ip),quote($hst),'f')),\
    'Host correctly registered in DNS',\
    'Host not correctly registered in DNS'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the host is registered correctly in the DNS.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="Host correctly registered in DNS" result="PASSED"><![CDATA[The host is registered correctly in the DNS.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Host not correctly registered in DNS.|Register the host.domain in the DNS.|
|Cannot determine IP address|Fix any problem with the host IP address.|
|Cannot access /bin/nslookup|Grant execute permissions on ``/bin/nslookup`` to the user who is logged in.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00030" mode="VERIFY" name="/etc/hosts Format">
<sdp_dependencies>
<sdp_dependency condition="IS" id="A00027" minimum="PASSED|RECORD" result="FAILED"><![CDATA[Requires domain name.]]></sdp_dependency>
</sdp_dependencies>
<sdp_command type="RDA"><![CDATA[
if !testFile('r','/etc/hosts')
 return setHcveResult('Cannot access /etc/hosts')
if !@tbl = grepFile('/etc/hosts',\
  concat('^([^\s\#]+\s+)+',quote(${RDA.HOST}),\
         '\s+([^\s\#]+\s+)*',quote(${RDA.NODE}),'(\s|\z|\#)'))
 return setHcveResult('no entry found')

# Test that line begins with IPv4 IP address
if grep(@tbl,'^(\d{1,3}\.){3}\d{1,3}\s','f')
 return setHcveResult('Adequate IPv4 entry')

# Tests that line begins with IPv6 IP address, first that all eight groups are populated, then situations where groups that are all zero are omitted (two colons together).
if grep(@tbl,'^([A-F\d]{1,4}(:[A-F\d]{1,4}){7}\s|\
                :(:[A-F\d]{1,4}){1,6}\s|\
                ([A-F\d]{1,4}:){1,5}(:[A-F\d]{1,4}){1,5}\s|\
                ([A-F\d]{1,4}:){1,6}:\s)','f')
 return setHcveResult('Adequate IPv6 entry')
return setHcveResult('no correct entry found')
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the ``/etc/hosts`` file contains a line with ``ip_address fully_qualified_domainname short_hostname``.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum="^Adequate" result="PASSED"><![CDATA[The ``/etc/hosts`` entry for the fully qualified domain name and host name is adequate.]]></sdp_action>
<sdp_action condition="==" minimum="Cannot access /etc/hosts" result="FAILED"><![CDATA[Grant read permissions on ``/etc/hosts`` to the current user.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[The fully qualified host name and host name are not configured correctly. Ensure that there is an IP address entry for the fully qualified domain name with the host name as one of the aliases.
|*Return Value*|*Action"|
|no entry found|No entry with the fully qualified domain name followed by the host name was found.|
|no correct entry found|No entry beginning with an IP address with the fully qualified domain name followed by the host name was found.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00031" mode="VERIFY" name="Oracle Home Length">
<sdp_command type="RDA"><![CDATA[var $ORACLE_HOME = getEnv('ORACLE_HOME')
call setHcveResult(cond(\
  not(defined($ORACLE_HOME)),\
    'ORACLE_HOME is not set',\
  expr('<=',length($ORACLE_HOME),127),\
    'Less than 127 char',\
    'Longer than 127 characters'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the path to the Oracle home directory is not longer than 127 characters.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="Less than 127 char" result="PASSED"><![CDATA[The Oracle home directory is not longer than 127 characters.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Longer than 127 characters|Change ORACLE_HOME to a directory not longer than 127 characters.|
|ORACLE_HOME is not set|Set the ORACLE_HOME environment variable.|]]></sdp_action>
</sdp_actions>
</sdp_rule>
<sdp_rule id="A00032" mode="VERIFY" name="NLS_LANG Defined?">
<sdp_command type="RDA"><![CDATA[var $env = getEnv('NLS_LANG')
call setHcveResult(cond(\
  not(defined($env)),\
    'Not set',\
  match($env,'american_america',true),\
    'Set properly',\
    'Not set properly'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the ``NLS_LANG`` environment variable is defined. If it is defined, then it must be set to ``American_America``, otherwise the Oracle Internet Directory (OID) Configuration Assistant will fail.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum="Not set|Set properly" result="PASSED"><![CDATA[The ``NLS_LANG`` environment variable is set properly or not set.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Not set properly|Set the ``NLS_LANG`` environment variable to ``AMERICAN_AMERICA.&lt;characterset&gt;``|]]></sdp_action>
</sdp_actions>
</sdp_rule>
</sdp_group>
</sdp_content>
</sdp_diaglet>


