summaryrefslogtreecommitdiffstats
path: root/rules.d
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2021-08-30 14:08:06 +0200
committerBastien Nocera <hadess@hadess.net>2021-09-01 15:49:34 +0200
commit94cb45d57f6e94dd4c93bd4706f9be70634bf03f (patch)
tree58bbbb2351138470118857c2c223318ff7f50350 /rules.d
parentcore: fix typo: they -> the (diff)
downloadsystemd-94cb45d57f6e94dd4c93bd4706f9be70634bf03f.tar.xz
systemd-94cb45d57f6e94dd4c93bd4706f9be70634bf03f.zip
udev: Import hwdb matches for USB devices
Import hwdb matches for USB devices (not interfaces) which don't usually have a modalias so that it's possible to, for example, make them available for unprivileged users.
Diffstat (limited to 'rules.d')
-rw-r--r--rules.d/50-udev-default.rules.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/rules.d/50-udev-default.rules.in b/rules.d/50-udev-default.rules.in
index 18a3cf46bf..aead6b9ca2 100644
--- a/rules.d/50-udev-default.rules.in
+++ b/rules.d/50-udev-default.rules.in
@@ -12,6 +12,7 @@ SUBSYSTEM=="rtc", KERNEL=="rtc0", SYMLINK+="rtc", OPTIONS+="link_priority=-100"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb"
ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}"
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="hwdb 'usb:v$attr{idVendor}p$attr{idProduct}'"
ACTION!="add", GOTO="default_end"