HP Integrity rx2800 Smart Setup Scripting Toolkit Administrator's Guide 4.0 - Page 57

ifhw, Synopsis, Description, Options, Examples, ifhw hwdisc.dat allboards.xml PCI:Smart Array 6402

Page 57 highlights

ifhw Synopsis ifhw [path] [hwdiscfilename] [path] [allboards.xml] [expression] Description The ifhw utility is executed from a script file, in conjunction with other utilities, to control the install process. The ifhw utility queries the hardware discovery file. Queries take the form of a logical expression, and the result of the expression is returned as the exit status of the tool, which the hosting script can use to conditionally perform actions. Options [path]hwdiscfilename [path]allboards.xml expression Specifies the hardware discovery file to use to run the query. Specifies the allboards.xml PCI device list file, which is used to convert PCI IDs found in hardware discovery into device names, such as "Smart Array 6402 Controller." Specifies the query expression. Examples The ifhw utility can use XML files as input to query the hardware discovery file. For example: ifhw hwdisc.dat allboards.xml "PCI:Smart Array 6402" • 0 (True) if the Smart Array 6402 is present • 1 (False) if the device is not present • 2 (Error) if the expression could not be understood • -1 or 255 if incorrect number of parameters given The following expressions used as shown in the Synopsis return the indicated result: • "PCI:Smart Array 6402" Returns True if the Smart Array 5i Controller is found in the system. • HWQ:RAM gte 512 Returns True if the amount of RAM in the hardware discovery file is at least 512. • HWQ:EFIFw neq "1.10" Returns True if the EFI Firmware version in the hardware discovery file is not 1.10. • HWQ:SystemName eq "Server rx4640" Returns True if the system name in the hardware discovery file exactly matches Server rx4640. • "PCI:Smart Array 6402" or "PCI:Smart Array 6404" Returns True if the system contains a Smart Array 6402 Controller or a Smart Array 6404 Controller Table 6-6 ifhw Operators Operator or term and or gt Result True if both operands are true. True if either operand is true. True if the first operand is greater than the second. ifhw 57

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65

ifhw
Synopsis
ifhw
[
path
][
hwdiscfilename
][
path
] [allboards.xml] [
expression
]
Description
The
ifhw
utility is executed from a script file, in conjunction with other utilities, to control the
install process. The
ifhw
utility queries the hardware discovery file. Queries take the form of a
logical expression, and the result of the expression is returned as the exit status of the tool, which
the hosting script can use to conditionally perform actions.
Options
[
path
]
hwdiscfilename
Specifies the hardware discovery file to use to run the query.
[
path
]
allboards.xml
Specifies the
allboards.xml
PCI device list file, which is used
to convert PCI IDs found in hardware discovery into device
names, such as “Smart Array 6402 Controller.”
expression
Specifies the query expression.
Examples
The
ifhw
utility can use XML files as input to query the hardware discovery file. For example:
ifhw hwdisc.dat allboards.xml "PCI:Smart Array 6402"
0 (True) if the Smart Array 6402 is present
1 (False) if the device is not present
2 (Error) if the expression could not be understood
-1 or 255 if incorrect number of parameters given
The following expressions used as shown in the Synopsis return the indicated result:
PCI:Smart Array 6402
Returns True if the Smart Array 5i Controller is found in the system.
HWQ:RAM gte 512
Returns True if the amount of RAM in the hardware discovery file is at least 512.
HWQ:EFIFw neq
1.10
Returns True if the EFI Firmware version in the hardware discovery file is not 1.10.
HWQ:SystemName eq
Server rx4640
Returns True if the system name in the hardware discovery file exactly matches
Server
rx4640
.
PCI:Smart Array 6402
or
PCI:Smart Array 6404
Returns True if the system contains a Smart Array 6402 Controller or a Smart Array 6404
Controller
Table 6-6 ifhw Operators
Result
Operator or
term
True if both operands are true.
and
True if either operand is true.
or
True if the first operand is greater than the second.
gt
ifhw
57