Skip to content

Commit

Permalink
Ensure TCSD (when present) is started before Clevis
Browse files Browse the repository at this point in the history
Signed-off-by: Oldřich Jedlička <[email protected]>
  • Loading branch information
oldium committed May 7, 2024
1 parent cf916f4 commit 358eb6b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/luks/systemd/clevis-luks-askpass.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/luks/systemd/clevis-tcsd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[Unit]
DefaultDependencies=no
After=local-fs.target
Requires=local-fs.target
2 changes: 2 additions & 0 deletions src/luks/systemd/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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

0 comments on commit 358eb6b

Please sign in to comment.