Skip to content

Commit 6fb4cd9

Browse files
committed
Ensure TCSD is started before Clevis for tpm1 pin functionality
This is a weak requirement, so when TCSD is missing, it does not influence the Clevis askpass service startup. Similarly if the TCSD startup fails, it does not affect the Clevis askpass service startup. Signed-off-by: Oldřich Jedlička <[email protected]>
1 parent e8d4378 commit 6fb4cd9

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

src/luks/systemd/clevis-luks-askpass.service.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
Description=Forward Password Requests to Clevis
33
Documentation=man:clevis-luks-unlockers(7)
44
DefaultDependencies=no
5+
After=tcsd.service
6+
Wants=tcsd.service
57
Before=shutdown.target
68
Conflicts=shutdown.target
79

src/luks/systemd/clevis-tcsd.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[Unit]
2+
DefaultDependencies=no
3+
After=local-fs.target
4+
Requires=local-fs.target
5+
Before=shutdown.target
6+
Conflicts=shutdown.target

src/luks/systemd/meson.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ if systemd.found() and sd_reply_pass.found()
1212
data.set('SYSTEMD_REPLY_PASS', sd_reply_pass.path())
1313

1414
unitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
15+
tcsdoverridedir = join_paths(unitdir, 'tcsd.service.d')
1516

1617
configure_file(
1718
input: 'clevis-luks-askpass.service.in',
@@ -28,6 +29,7 @@ if systemd.found() and sd_reply_pass.found()
2829
)
2930

3031
install_data('clevis-luks-askpass.path', install_dir: unitdir)
32+
install_data('clevis-tcsd.conf', install_dir: tcsdoverridedir)
3133
else
3234
warning('Will not install systemd support due to missing dependencies!')
3335
endif

0 commit comments

Comments
 (0)