summaryrefslogtreecommitdiffstats
path: root/dracut/module-setup.sh
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2016-01-20 21:37:30 +0100
committerGravatar Christian Hesse <mail@eworm.de>2016-01-20 21:37:30 +0100
commite6ec09692be2a80747164fbca9036cf699ab2d85 (patch)
treebae584ec225c5a34a22e8bec93ffa601ea69c8e7 /dracut/module-setup.sh
parent7ba0988d6080b20f16fa065aade707d9d60a3bb3 (diff)
downloadmkinitcpio-ykfde-e6ec09692be2a80747164fbca9036cf699ab2d85.tar.gz
mkinitcpio-ykfde-e6ec09692be2a80747164fbca9036cf699ab2d85.tar.zst
update the dracut stuff
Not tested, though...
Diffstat (limited to 'dracut/module-setup.sh')
-rwxr-xr-xdracut/module-setup.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/dracut/module-setup.sh b/dracut/module-setup.sh
index d907ba7..4a06e84 100755
--- a/dracut/module-setup.sh
+++ b/dracut/module-setup.sh
@@ -10,12 +10,23 @@ depends() {
}
install() {
+ # install basic files to initramfs
inst_rules "$moddir/20-ykfde.rules"
inst_hook cmdline 30 "$moddir/parse-mod.sh"
inst_simple "$moddir/ykfde.sh" /sbin/ykfde.sh
inst_simple /usr/lib/udev/ykfde
inst_simple /etc/ykfde.conf
- inst_dir /etc/ykfde.d/*
+
+ # this is required for second factor
+ if egrep -qi 'second factor = (yes|true|1)' /etc/ykfde.conf; then
+ inst_simple /usr/lib/systemd/system/cryptsetup-pre.target
+ inst_simple /usr/lib/systemd/system/ykfde-2f.service
+ ln_r $systemdsystemunitdir/ykfde-2f.service $systemdsystemunitdir/sysinit.target.wants/ykfde-2f.service
+ inst_simple /usr/lib/systemd/scripts/ykfde-2f
+ inst_simple /usr/bin/keyctl
+ inst_simple /usr/bin/systemd-ask-password
+
+ fi
dracut_need_initqueue
}