Skip to content

Commit 23d5366

Browse files
committed
Ensure TCSD (when present) is started before Clevis
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
1 parent cf916f4 commit 23d5366

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-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

68
[Service]
79
Type=simple

src/luks/systemd/clevis-tcsd.conf

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

src/luks/systemd/meson.build

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ 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+
systemunitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
16+
tcsdoverridedir = join_paths(systemunitdir, 'tcsd.service.d')
1517

1618
configure_file(
1719
input: 'clevis-luks-askpass.service.in',
@@ -28,6 +30,7 @@ if systemd.found() and sd_reply_pass.found()
2830
)
2931

3032
install_data('clevis-luks-askpass.path', install_dir: unitdir)
33+
install_data('clevis-tcsd.conf', install_dir: tcsdoverridedir)
3134
else
3235
warning('Will not install systemd support due to missing dependencies!')
3336
endif

0 commit comments

Comments
 (0)