#!/bin/sh build() { # install basic files to initramfs add_binary /usr/lib/ykfde/worker add_file /usr/lib/initcpio/udev/20-ykfde.rules /usr/lib/udev/rules.d/20-ykfde.rules add_file /etc/ykfde.conf add_systemd_unit ykfde-worker.service add_symlink /usr/lib/systemd/system/sysinit.target.wants/ykfde-worker.service ../ykfde-worker.service # this is required for second factor if grep -E -qi 'second factor = (yes|true|1)' /etc/ykfde.conf; then add_systemd_unit cryptsetup-pre.target add_systemd_unit ykfde-2f.service add_symlink /usr/lib/systemd/system/sysinit.target.wants/ykfde-2f.service ../ykfde-2f.service add_binary systemd-ask-password fi } help() { echo "This hook adds support for opening LUKS devices with Yubico key." echo "Read the documentation for additional steps to set this up." }