Skip to content
Snippets Groups Projects
Commit 96f6e0d6 authored by Marc's avatar Marc
Browse files

Make sure systemd service gets installed and runs when changes in /run/systemd/ask-password happen

parent 5e5923cc
Branches
Tags
No related merge requests found
......@@ -22,6 +22,7 @@ install() {
if [ "${hostonly_cmdline}" = "yes" ] && have_tang_bindings; then
if dracut_module_included "systemd"; then
inst_multiple $systemdsystemunitdir/ihct-luks-askpass-patch.service
systemctl -q --root "$initdir" add-wants cryptsetup.target ihct-luks-askpass-patch.path
fi
fi
......
......@@ -12,6 +12,7 @@ while true; do
# Touch network dev files so the boot continues
# Read ifaces if available
IFACES=
[ -e /tmp/net.ifaces ] && read IFACES < /tmp/net.ifaces
if [ -n "${IFACES}" ]; then
......
[Unit]
Description=Patch for neednet problematic and no network cable attached
Documentation=man:clevis-luks-unlockers(7)
DefaultDependencies=no
Before=cryptsetup-pre.target
Wants=cryptsetup-pre.target
[Path]
DirectoryNotEmpty=/run/systemd/ask-password
MakeDirectory=yes
[Install]
WantedBy=cryptsetup.target
......@@ -26,6 +26,8 @@ if systemd.found() and sd_reply_pass.found()
install_dir: libexecdir,
configuration: data
)
install_data('ihct-luks-askpass-patch.path', install_dir: unitdir)
else
warning('Will not install systemd support due to missing dependencies!')
endif
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment