debian/initramfs/scripts/local-bottom/cryptopensc
raw| 1 | #!/bin/sh |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | PREREQ="" |
| 6 | |
| 7 | prereqs() |
| 8 | { |
| 9 | echo "$PREREQ" |
| 10 | } |
| 11 | |
| 12 | case $1 in |
| 13 | prereqs) |
| 14 | prereqs |
| 15 | exit 0 |
| 16 | ;; |
| 17 | esac |
| 18 | |
| 19 | # Hook for stopping smartcard reading software |
| 20 | |
| 21 | if [ ! -x /usr/sbin/pcscd ]; then |
| 22 | exit 0 |
| 23 | fi |
| 24 | |
| 25 | . /scripts/functions |
| 26 | |
| 27 | if PID="$(cat /run/pcscd.pid)" 2>/dev/null && |
| 28 | [ "$(readlink -f "/proc/$PID/exe")" = "/usr/sbin/pcscd" ]; then |
| 29 | log_begin_msg "Stopping pcscd" |
| 30 | kill -TERM "$PID" |
| 31 | log_end_msg |
| 32 | fi |