diff options
author | Christian Hesse <mail@eworm.de> | 2013-10-01 10:42:47 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2013-10-01 10:42:47 +0200 |
commit | be598301fe099be177acefff54f9db65fe263cc7 (patch) | |
tree | 8f786a405b4da2303b0a491f0f8fe4460454551f /udev | |
parent | 54db02d7d6dbead7a7da6a7b110a34721affdf44 (diff) | |
download | mkinitcpio-ykfde-be598301fe099be177acefff54f9db65fe263cc7.tar.gz mkinitcpio-ykfde-be598301fe099be177acefff54f9db65fe263cc7.tar.zst |
update for systemd in initramfs
Diffstat (limited to 'udev')
-rw-r--r-- | udev/20-ykfde.rules | 4 | ||||
-rwxr-xr-x | udev/ykfde | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/udev/20-ykfde.rules b/udev/20-ykfde.rules new file mode 100644 index 0000000..54cd1c2 --- /dev/null +++ b/udev/20-ykfde.rules @@ -0,0 +1,4 @@ +# do challenge response with Yubikey II and try to answer +# password agent +ACTION=="add", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0010|0110|0111", \ + RUN+="/usr/lib/udev/ykfde" diff --git a/udev/ykfde b/udev/ykfde new file mode 100755 index 0000000..ce83117 --- /dev/null +++ b/udev/ykfde @@ -0,0 +1,9 @@ +#!/bin/sh + +source /etc/ykfde.conf + +# Looks like Yubikey is reset after challenge response, triggering +# yet another add event. Ignore if the file exists. +[ -s /crypto_keyfile.bin ] && exit 0 + +ykchalresp -${YKFDE_SLOT:-2} "$(cat /ykfde-challenge)" > /crypto_keyfile.bin 2>/dev/null |