summaryrefslogtreecommitdiffstats
path: root/rules.d/60-dmi-id.rules
diff options
context:
space:
mode:
Diffstat (limited to 'rules.d/60-dmi-id.rules')
-rw-r--r--rules.d/60-dmi-id.rules14
1 files changed, 14 insertions, 0 deletions
diff --git a/rules.d/60-dmi-id.rules b/rules.d/60-dmi-id.rules
new file mode 100644
index 0000000..6c61ea2
--- /dev/null
+++ b/rules.d/60-dmi-id.rules
@@ -0,0 +1,14 @@
+# 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"