summaryrefslogtreecommitdiffstats
path: root/mkinitcpio/ykfde
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2014-12-22 22:03:21 +0100
committerGravatar Christian Hesse <mail@eworm.de>2014-12-22 23:20:10 +0100
commit0498dd512161b7fb07e703e03bc9b8ca8b3dd400 (patch)
tree0ced97f5e7015af52d712c53cf312adfa6c2dfa7 /mkinitcpio/ykfde
parentebcce373b196cd4ad44667a05c856ed0f4b472b5 (diff)
downloadmkinitcpio-ykfde-0498dd512161b7fb07e703e03bc9b8ca8b3dd400.tar.gz
mkinitcpio-ykfde-0498dd512161b7fb07e703e03bc9b8ca8b3dd400.tar.zst
replace shell script with C code, and many more
* place bin/ykfde with C source code bin/ykfde.c * challenge/response can be updated in place WARNING: This required config file syntax change! * updates and simplification to udev/ykfde * a lot more... Signed-off-by: Christian Hesse <mail@eworm.de>
Diffstat (limited to 'mkinitcpio/ykfde')
-rw-r--r--mkinitcpio/ykfde18
1 files changed, 18 insertions, 0 deletions
diff --git a/mkinitcpio/ykfde b/mkinitcpio/ykfde
new file mode 100644
index 0000000..f4115d6
--- /dev/null
+++ b/mkinitcpio/ykfde
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+build() {
+ # This will update to LUKS key slot if Yubikey is available.
+ # Do not fail if key is not present!
+ /usr/bin/ykfde >/dev/null 2>/dev/null || true
+
+ # install files to initramfs
+ add_binary /usr/lib/udev/ykfde
+ add_file /usr/lib/initcpio/udev/20-ykfde.rules /usr/lib/udev/rules.d/20-ykfde.rules
+ add_file /etc/ykfde.conf
+ add_full_dir /etc/ykfde.d/
+}
+
+help() {
+ echo "This hook adds support for opening LUKS devices with Yubico key."
+ echo "Please use command 'ykfde' to prepare."
+}