summaryrefslogtreecommitdiffstats
path: root/hook/ykfde
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-10-01 10:42:47 +0200
committerGravatar Christian Hesse <mail@eworm.de>2013-10-01 10:42:47 +0200
commitbe598301fe099be177acefff54f9db65fe263cc7 (patch)
tree8f786a405b4da2303b0a491f0f8fe4460454551f /hook/ykfde
parent54db02d7d6dbead7a7da6a7b110a34721affdf44 (diff)
downloadmkinitcpio-ykfde-be598301fe099be177acefff54f9db65fe263cc7.tar.gz
mkinitcpio-ykfde-be598301fe099be177acefff54f9db65fe263cc7.tar.zst
update for systemd in initramfs
Diffstat (limited to 'hook/ykfde')
-rw-r--r--hook/ykfde36
1 files changed, 0 insertions, 36 deletions
diff --git a/hook/ykfde b/hook/ykfde
deleted file mode 100644
index be75694..0000000
--- a/hook/ykfde
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-
-run_hook() {
- ykfde_slot="${ykfde_slot:-1}"
- ykfde_count=0
-
- if [ -s /ykfde-challenge ]; then
- modprobe -a -q usbhid >/dev/null 2>&1
-
- if [ "${ykfde_twofactor}" = "y" ]; then
- echo -n "Please give two factor key for Yubikey: "
- stty -echo
- read TWOFACTOR
- stty echo
- echo
- else
- TWOFACTOR=""
- fi
-
- # Any chance to get this more efficient? Without polling and without long sleep times would be great.
- while ! ykchalresp -${ykfde_slot} "${TWOFACTOR}$(cat /ykfde-challenge)" > /crypto_keyfile.bin 2>/dev/null; do
- if [ $((ykfde_count++)) -gt 10 ]; then
- msg ":: No Yubikey presend, fallback to interactive mode"
- rm -f /ykfde-challenge
- return 1
- fi
- sleep 0.3
- done
-
- msg ":: Created crypto keyfile using Yubikey, handing over to encrypt hook"
- rm -f /ykfde-challenge
- else
- msg ":: No challenge found, falling back to interactive mode"
- return 1
- fi
-}