From 358eb6ba95fa3d89cf09b3d01925c874b70e8049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Old=C5=99ich=20Jedli=C4=8Dka?= Date: Sat, 4 May 2024 20:30:33 +0200 Subject: [PATCH] Ensure TCSD (when present) is started before Clevis MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Oldřich Jedlička --- src/luks/systemd/clevis-luks-askpass.service.in | 2 ++ src/luks/systemd/clevis-tcsd.conf | 4 ++++ src/luks/systemd/meson.build | 2 ++ 3 files changed, 8 insertions(+) create mode 100644 src/luks/systemd/clevis-tcsd.conf diff --git a/src/luks/systemd/clevis-luks-askpass.service.in b/src/luks/systemd/clevis-luks-askpass.service.in index 6b4a7e31..ed2afca8 100644 --- a/src/luks/systemd/clevis-luks-askpass.service.in +++ b/src/luks/systemd/clevis-luks-askpass.service.in @@ -2,6 +2,8 @@ Description=Forward Password Requests to Clevis Documentation=man:clevis-luks-unlockers(7) DefaultDependencies=no +After=tcsd.service +Wants=tcsd.service [Service] Type=simple diff --git a/src/luks/systemd/clevis-tcsd.conf b/src/luks/systemd/clevis-tcsd.conf new file mode 100644 index 00000000..58411e91 --- /dev/null +++ b/src/luks/systemd/clevis-tcsd.conf @@ -0,0 +1,4 @@ +[Unit] +DefaultDependencies=no +After=local-fs.target +Requires=local-fs.target diff --git a/src/luks/systemd/meson.build b/src/luks/systemd/meson.build index b10494e3..d5796413 100644 --- a/src/luks/systemd/meson.build +++ b/src/luks/systemd/meson.build @@ -12,6 +12,7 @@ if systemd.found() and sd_reply_pass.found() data.set('SYSTEMD_REPLY_PASS', sd_reply_pass.path()) unitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir') + tcsdoverridedir = join_paths(unitdir, 'tcsd.service.d') configure_file( input: 'clevis-luks-askpass.service.in', @@ -28,6 +29,7 @@ if systemd.found() and sd_reply_pass.found() ) install_data('clevis-luks-askpass.path', install_dir: unitdir) + install_data('clevis-tcsd.conf', install_dir: tcsdoverridedir) else warning('Will not install systemd support due to missing dependencies!') endif