]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
rules: automatically pull in smartcard.target from all CCID devices
authorLennart Poettering <lennart@poettering.net>
Tue, 19 May 2020 22:35:30 +0000 (00:35 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 21 May 2020 07:23:06 +0000 (09:23 +0200)
We apparently never matched the USB interface class. Let's fix that.

Prompted by: #15676

rules.d/99-systemd.rules.in

index c34b60621683831271b5342b0eb1f0dbd1628d83..1c60eec587040252ca41e9018372ac2e939e49b2 100644 (file)
@@ -49,6 +49,7 @@ SUBSYSTEM=="net", KERNEL!="lo", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsys
 SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/bluetooth/devices/%k"
 
 SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_WANTS}+="bluetooth.target", ENV{SYSTEMD_USER_WANTS}+="bluetooth.target"
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0b????:*", ENV{ID_SMARTCARD_READER}="1"
 ENV{ID_SMARTCARD_READER}=="?*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="smartcard.target", ENV{SYSTEMD_USER_WANTS}+="smartcard.target"
 SUBSYSTEM=="sound", KERNEL=="card*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sound.target", ENV{SYSTEMD_USER_WANTS}+="sound.target"