Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
SmartSetup Scripting Toolkit Deployment Guide: HP Integrity Servers with Linux > Chapter 6 Utilities Reference

ifhw

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

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 makes intelligent queries against 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.

Table 6-20 Options

Option

Description

[path]hwdiscfilename

This argument specifies the hardware discovery file used to run the query.

[path]allboards.xml

This argument 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

This argument specifies the query expression.

 

Examples

The ifhw utility might use XML files as input to query the hardware discovery file. The command line input:

ifhw hwdisc.xml allboards.xml "PCI:Smart Array 6402"

returns the following possible codes:

  • 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"

    True if the system name in the hardware discovery file exactly matches "Server rx4640”

  • "PCI:Smart Array 6402" or "PCI:Smart Array 6404"

    True if the system contains a Smart Array 6402 Controller or a Smart Array 6404 Controller

Table 6-21 Options

Operator or Term

Result

and

True if both operands are true.

or

True if either operand is true.

gt

True if the first operand is greater than the second.

lt

True if the first operand is less than the second.

gte

True if the first operand is greater than or equal to the second.

lte

True if the first operand is less than or equal to the second.

eq

True if the two operands are equal.

neq

True if the two operands are not equal.

not

True if the operand is false.

PCI:string

True if a PCI device whose name includes string is found in the hardware discovery file. string is case-sensitive.

HWQ:string

The hardware discovery file is searched for string, and the corresponding value is the value of this term. string is case-sensitive.

string

A literal string, used for comparison.

number

A literal number, used for comparison.

 

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2007–2008 Hewlett-Packard Development Company, L.P.