mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
dafd65b150
The DMI rules where so far guarded by an ACTION=="add" rule, but that doesn't really make sense for setting properties (only for setting access modes/ownership of nodes). Hence let's move this into its own file, that guards properly on ACTION!="remove". Before this change the hardware vendor/model info would be dropped whenever the device was retriggered.
15 lines
637 B
Plaintext
15 lines
637 B
Plaintext
# do not edit this file, it will be overwritten on update
|
|
|
|
ACTION=="remove", GOTO="dmi_end"
|
|
SUBSYSTEM!="dmi", GOTO="dmi_end"
|
|
|
|
ENV{ID_SYS_VENDOR_IS_RUBBISH}!="1", ENV{ID_VENDOR}="$attr{sys_vendor}"
|
|
ENV{ID_SYSFS_ATTRIBUTE_MODEL}=="", ENV{ID_PRODUCT_NAME_IS_RUBBISH}!="1", ENV{ID_MODEL}="$attr{product_name}"
|
|
ENV{ID_SYSFS_ATTRIBUTE_MODEL}=="product_name", ENV{ID_MODEL}="$attr{product_name}"
|
|
ENV{ID_SYSFS_ATTRIBUTE_MODEL}=="product_version", ENV{ID_MODEL}="$attr{product_version}"
|
|
# fallback to board information
|
|
ENV{ID_VENDOR}=="", ENV{ID_VENDOR}="$attr{board_vendor}"
|
|
ENV{ID_MODEL}=="", ENV{ID_MODEL}="$attr{board_name}"
|
|
|
|
LABEL="dmi_end"
|