Specifies how to detect whether a device is present.
Some devices are only present in certain system configurations. For example:
Device presence is detected by executing actions, such as compare_presence and compare_vpd.
Device operations like configuration and sensor monitoring will only be performed if the actions indicate the device is present.
The actions can be specified in two ways:
The return value of the rule or the last action in the array indicates whether the device is present. A return value of true means the device is present; false means the device is missing.
Device presence will only be detected once per boot of the system. Presence will be determined prior to the first device operation (such as configuration). When the system is re-booted, presence will be re-detected. As a result, presence detection is not supported for devices that can be removed or added (hot-plugged) while the system is booted and running.
Name | Required | Type | Description |
---|---|---|---|
comments | no | array of strings | One or more comment lines describing the presence detection. |
rule_id | see notes | string | Unique ID of the rule to execute. |
actions | see notes | array of actions | One or more actions to execute. |
{ "comments": [ "Regulator is only present on the FooBar backplane" ], "rule_id": "is_foobar_backplane_installed_rule" } { "comments": [ "Regulator is only present when CPU 3 is present" ], "actions": [ { "compare_presence": { "fru": "/system/chassis/motherboard/cpu3", "value": true } } ] }