hostname: add hardware Stock-Keeping Unit
Add support for the hardware Stock-Keeping Unit (SKU). The SKU describes a distinct type of hardware for sale, purchase or inventory management. The value is read from the file /etc/machine-info or DMI as fallback. The integration provides an unified interface to collect detail hardware information. The /etc/machine-info entry enables embedded devices without UEFI support to read the information from a custom store.
This commit is contained in:
@@ -11,6 +11,9 @@ ENV{ID_SYSFS_ATTRIBUTE_MODEL}=="product_version", ENV{ID_MODEL}="$attr{product_v
|
||||
ENV{ID_VENDOR}=="", ENV{ID_VENDOR}="$attr{board_vendor}"
|
||||
ENV{ID_MODEL}=="", ENV{ID_MODEL}="$attr{board_name}"
|
||||
|
||||
# stock keeping unit
|
||||
ENV{ID_PRODUCT_SKU_IS_RUBBISH}!="1", ENV{ID_SKU}="$attr{product_sku}"
|
||||
|
||||
# chassis asset tag
|
||||
ENV{MODALIAS}!="", ATTR{chassis_asset_tag}!="", IMPORT{builtin}="hwdb '$attr{modalias}cat$attr{chassis_asset_tag}:'"
|
||||
ENV{ID_CHASSIS_ASSET_TAG_IS_RUBBISH}!="1", ENV{ID_CHASSIS_ASSET_TAG}="$attr{chassis_asset_tag}"
|
||||
|
||||
Reference in New Issue
Block a user