[Pcsclite-git-commit] [CCID] 01/02: udev rule: allow rule overwrite

Ludovic Rousseau rousseau at moszumanska.debian.org
Sun Sep 10 14:02:20 UTC 2017


This is an automated email from the git hooks/post-receive script.

rousseau pushed a commit to branch master
in repository CCID.

commit abed9dff59d7d049e3323a66b0ab710f31fb546e
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Thu Aug 31 10:07:33 2017 +0200

    udev rule: allow rule overwrite
    
    Use:
    ATTR{power/control}="auto"
    instead of:
    RUN+="/bin/sh -c 'echo auto > /sys/$devpath/power/control'"
    
    It looks like this allows to add udev rules after that to change again
    the power/control behavior.
    
    Closes github issue #36
    "USB autosuspend problem: libusb_open returns LIBUSB_ERROR_IO"
    https://github.com/LudovicRousseau/CCID/issues/36
---
 src/92_pcscd_ccid.rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/92_pcscd_ccid.rules b/src/92_pcscd_ccid.rules
index 6bb7752..0fe201f 100644
--- a/src/92_pcscd_ccid.rules
+++ b/src/92_pcscd_ccid.rules
@@ -12,7 +12,7 @@ ENV{DEVTYPE}!="usb_device", GOTO="pcscd_ccid_rules_end"
 ATTRS{idVendor}=="0d46", ATTRS{idProduct}=="4081", RUN+="/usr/sbin/Kobil_mIDentity_switch"
 
 # set USB power management to auto.
-ENV{ID_USB_INTERFACES}==":0b0000:", RUN+="/bin/sh -c 'echo auto > /sys/$devpath/power/control'"
+ENV{ID_USB_INTERFACES}==":0b0000:", TEST=="power/control", ATTR{power/control}="auto"
 
 # All done
 LABEL="pcscd_ccid_rules_end"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/CCID.git



More information about the Pcsclite-cvs-commit mailing list