diff options
author | Michael Weiser <michael.weiser@gmx.de> | 2019-10-10 11:42:43 -0400 |
---|---|---|
committer | Craig Andrews <candrews@gentoo.org> | 2019-10-10 12:04:49 -0400 |
commit | 1123ad37dafee0cc747fc8e55b18d7f143e08957 (patch) | |
tree | 2ae9ea237c19b4e3dda70b20fee25ade4312853e /sys-apps/pcsc-lite/files | |
parent | dev-libs/openssl: arm64 stable (bug #696010) (diff) | |
download | gentoo-1123ad37dafee0cc747fc8e55b18d7f143e08957.tar.gz gentoo-1123ad37dafee0cc747fc8e55b18d7f143e08957.tar.bz2 gentoo-1123ad37dafee0cc747fc8e55b18d7f143e08957.zip |
sys-apps/pcsc-lite: Provide systemd-aware udev rule
Provide a systemd-aware udev rule. Move OpenRC logic to helper script
which behaves as a no-op on non-OpenRC systems.
Closes: https://bugs.gentoo.org/554118
Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'sys-apps/pcsc-lite/files')
-rw-r--r-- | sys-apps/pcsc-lite/files/99-pcscd-hotplug-r1.rules | 6 | ||||
-rw-r--r-- | sys-apps/pcsc-lite/files/pcscd-udev | 14 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sys-apps/pcsc-lite/files/99-pcscd-hotplug-r1.rules b/sys-apps/pcsc-lite/files/99-pcscd-hotplug-r1.rules new file mode 100644 index 000000000000..fc612d5e25f3 --- /dev/null +++ b/sys-apps/pcsc-lite/files/99-pcscd-hotplug-r1.rules @@ -0,0 +1,6 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# We add this here so that it runs after ccid's and ifd-gempc's rules; +# if we just added a pcscd-owned device, we hotplug the pcscd service. +ACTION=="add", ENV{PCSCD}=="1", GROUP="pcscd", TAG+="systemd", ENV{SYSTEMD_WANTS}+="pcscd.service", RUN+="pcscd.sh" diff --git a/sys-apps/pcsc-lite/files/pcscd-udev b/sys-apps/pcsc-lite/files/pcscd-udev new file mode 100644 index 000000000000..e6d6c7348887 --- /dev/null +++ b/sys-apps/pcsc-lite/files/pcscd-udev @@ -0,0 +1,14 @@ +#!/bin/sh +# +# pcscd.sh: udev external RUN script +# +# based on netifrc net.sh helper +# Copyright 2007 Roy Marples <uberlord@gentoo.org> +# Distributed under the terms of the GNU General Public License v2 + +# make sure openrc is managing services +if [ ! -d /run/openrc ]; then + exit 0 +fi + +IN_HOTPLUG=1 /etc/init.d/pcscd --quiet start |