dracut module
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-09-19 16:49:40 +02:00
parent 402719337b
commit d09569f060
12 changed files with 812 additions and 535 deletions

View File

@@ -0,0 +1,30 @@
#!/bin/bash
check () {
if ! dracut_module_included "systemd"; then
"luks-2fa needs systemd in the initramfs"
return 1
fi
return 255
set -e
bash -n "$moddir/luks-2fa-generator.sh"
}
depends () {
echo "systemd"
return 0
}
install () {
inst "$moddir/luks-2fa-generator.sh" "/etc/systemd/system-generators/luks-2fa-generator.sh"
inst_simple "/usr/bin/xxd" "/usr/bin/xxd"
inst_simple "/usr/bin/fido2luks" "/usr/bin/fido2luks"
inst "$systemdutildir/systemd-cryptsetup"
mkdir -p "$initdir/luks-2fa"
inst "$moddir/luks-2fa.target" "/etc/systemd/system/luks-2fa.target"
mkdir -p "$initdir/etc/systemd/system/luks-2fa.target.wants"
mkdir -p "$initdir/etc/systemd/system/sysinit.target.wants"
ln -sf "/etc/systemd/system/luks-2fa.target" "$initdir/etc/systemd/system/sysinit.target.wants/"
}