File openct-systemd.patch of Package openct

--- openct-0.6.20/etc/openct.udev.in.nosystemd	2013-11-08 18:23:41.693013415 -0200
+++ openct-0.6.20/etc/openct.udev.in	2013-11-08 18:24:21.769693545 -0200
@@ -28,47 +28,47 @@
 ATTR{bInterfaceClass}=="0b", ATTR{bInterfaceSubClass}=="00", ATTR{bInterfaceProtocol}=="00", ATTRS{idVendor}=="?*", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$parent"
 
 # egate
-ATTR{idVendor}=="0973", ATTR{idProduct}=="0001", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="0973", ATTR{idProduct}=="0001", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
 # eToken
-ATTR{idVendor}=="0529", ATTR{idProduct}=="050c", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
-ATTR{idVendor}=="0529", ATTR{idProduct}=="0514", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="0529", ATTR{idProduct}=="050c", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
+ATTR{idVendor}=="0529", ATTR{idProduct}=="0514", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
 # eToken 64
-ATTR{idVendor}=="0529", ATTR{idProduct}=="0600", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
-ATTR{idVendor}=="0529", ATTR{idProduct}=="0700", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="0529", ATTR{idProduct}=="0600", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
+ATTR{idVendor}=="0529", ATTR{idProduct}=="0700", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
 # eutron
-ATTR{idVendor}=="073d", ATTR{idProduct}=="0005", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="073d", ATTR{idProduct}=="0005", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
 # ikey2k
-ATTR{idVendor}=="04b9", ATTR{idProduct}=="1200", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
-ATTR{idVendor}=="04b9", ATTR{idProduct}=="1202", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="04b9", ATTR{idProduct}=="1200", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
+ATTR{idVendor}=="04b9", ATTR{idProduct}=="1202", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
 # ikey3k
-ATTR{idVendor}=="04b9", ATTR{idProduct}=="1300", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="04b9", ATTR{idProduct}=="1300", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
 # starkey
-ATTR{idVendor}=="096e", ATTR{idProduct}=="0005", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="096e", ATTR{idProduct}=="0005", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
 # cardman
-#ATTR{idVendor}=="076b", ATTR{idProduct}=="0596", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
-#ATTR{idVendor}=="076b", ATTR{idProduct}=="1784", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
-#ATTR{idVendor}=="08d4", ATTR{idProduct}=="0009", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+#ATTR{idVendor}=="076b", ATTR{idProduct}=="0596", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
+#ATTR{idVendor}=="076b", ATTR{idProduct}=="1784", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
+#ATTR{idVendor}=="08d4", ATTR{idProduct}=="0009", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
 
 # spr 532 - ccid, but with wrong interface class (vendor) :(
-ATTR{idVendor}=="04e6", ATTR{idProduct}=="0003", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
-ATTR{idVendor}=="04e6", ATTR{idProduct}=="E003", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="04e6", ATTR{idProduct}=="0003", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
+ATTR{idVendor}=="04e6", ATTR{idProduct}=="E003", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
 # pertosmart1030
-ATTR{idVendor}=="072f", ATTR{idProduct}=="0001", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
-ATTR{idVendor}=="072f", ATTR{idProduct}=="8009", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="072f", ATTR{idProduct}=="0001", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
+ATTR{idVendor}=="072f", ATTR{idProduct}=="8009", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
 # pertosmart1038
-ATTR{idVendor}=="072f", ATTR{idProduct}=="9000", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
-ATTR{idVendor}=="072f", ATTR{idProduct}=="9006", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
-ATTR{idVendor}=="072f", ATTR{idProduct}=="9007", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
-ATTR{idVendor}=="072f", ATTR{idProduct}=="90d0", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="072f", ATTR{idProduct}=="9000", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
+ATTR{idVendor}=="072f", ATTR{idProduct}=="9006", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
+ATTR{idVendor}=="072f", ATTR{idProduct}=="9007", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
+ATTR{idVendor}=="072f", ATTR{idProduct}=="90d0", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
 # wbeiuu	- driver not working yet.
-#ATTR{idVendor}=="104f", ATTR{idProduct}=="0004", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+#ATTR{idVendor}=="104f", ATTR{idProduct}=="0004", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
 # cyberjack
-ATTR{idVendor}=="0c4b", ATTR{idProduct}=="0100", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="0c4b", ATTR{idProduct}=="0100", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
 # rutoken
-ATTR{idVendor}=="0a89", ATTR{idProduct}=="0020", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
-ATTR{idVendor}=="0a89", ATTR{idProduct}=="0012", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="0a89", ATTR{idProduct}=="0020", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
+ATTR{idVendor}=="0a89", ATTR{idProduct}=="0012", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
 # ePass3000
-ATTR{idVendor}=="096e", ATTR{idProduct}=="0401", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="096e", ATTR{idProduct}=="0401", MODE="0660", GROUP="scard", TAG+="systemd", ENV{SYSTEMD_WANTS}="openct-handler@usb:$env{ID_VENDOR_ID}-$env{ID_MODEL_ID}-$env{ID_REVISION}\x20usb\x20-dev-bus-usb-$env{BUSNUM}-$env{DEVNUM}.service"
 
 LABEL="openct_usb_rules_end"