summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--install/ykfde3
-rwxr-xr-xudev/ykfde3
2 files changed, 4 insertions, 2 deletions
diff --git a/install/ykfde b/install/ykfde
index f24580f..7489e26 100644
--- a/install/ykfde
+++ b/install/ykfde
@@ -1,8 +1,9 @@
#!/bin/sh
build() {
- add_binary ykchalresp
+ add_binary inotifywait
add_binary tr
+ add_binary ykchalresp
add_binary /usr/lib/udev/ykfde
add_binary /usr/lib/systemd/systemd-reply-password
add_file /usr/lib/initcpio/udev/20-ykfde.rules /usr/lib/udev/rules.d/20-ykfde.rules
diff --git a/udev/ykfde b/udev/ykfde
index 239f8bd..7a53bcd 100755
--- a/udev/ykfde
+++ b/udev/ykfde
@@ -10,6 +10,7 @@ source /etc/ykfde.conf
ykchalresp -${YKFDE_SLOT:-2} "$(cat /ykfde-challenge)" 2>/dev/null | tr -d '\n' > /crypto_keyfile.bin
# if the systemd unit was faster try to answer password agent
-for REQUEST in $(grep -l '^Message=Please enter passphrase for disk' /run/systemd/ask-password/ask.*); do
+for REQUEST in $(grep -l '^Message=Please enter passphrase for disk' /run/systemd/ask-password/ask.* || \
+ inotifywait /run/systemd/ask-password/ 2>/dev/null | awk '{ print $1 $3 }'); do
/usr/lib/systemd/systemd-reply-password 1 $(grep '^Socket=' ${REQUEST} | cut -d= -f2) < /crypto_keyfile.bin
done