summaryrefslogtreecommitdiffstats
path: root/rules.d
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-01-23 04:57:43 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-01-23 05:04:37 +0100
commitda60d91c9908b33fa6baa10ef80a7adc2312e615 (patch)
tree35e096e2f288f539640f75e80e836a42b6c2b07e /rules.d
parentrule: make ID_SYSFS_ATTRIBUTE_MODEL also accept product_name (diff)
downloadsystemd-da60d91c9908b33fa6baa10ef80a7adc2312e615.tar.xz
systemd-da60d91c9908b33fa6baa10ef80a7adc2312e615.zip
rule: fallback to use board information if product information is not set
Diffstat (limited to 'rules.d')
-rw-r--r--rules.d/50-udev-default.rules.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/rules.d/50-udev-default.rules.in b/rules.d/50-udev-default.rules.in
index dcc7a77630..9cdaadb4cd 100644
--- a/rules.d/50-udev-default.rules.in
+++ b/rules.d/50-udev-default.rules.in
@@ -109,6 +109,9 @@ SUBSYSTEM!="dmi", GOTO="dmi_end"
ENV{ID_VENDOR}="$attr{sys_vendor}"
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"
LABEL="default_end"