Skip to content

Commit

Permalink
units/blockdev@.target: conflict with umount.target
Browse files Browse the repository at this point in the history
Follow-up for d120ce478dc0043c89899799b5c1aaf62901bea9

blockdev@.target is used as a synchronization point between
the mount unit and corresponding systemd-cryptsetup@.service.
After the mentioned commit, it doesn't get a stop job enqueued
during shutdown, and thus the stop job for systemd-cryptsetup@.service
could be run before the mount unit is stopped.

Therefore, let's make blockdev@.target conflict with umount.target,
which is also what systemd-cryptsetup@.service does.

Fixes #29336

(cherry picked from commit 99f360a46b6304d87a483be8e09d5e5176be13aa)
  • Loading branch information
YHNdnzj authored and msekletar committed Feb 15, 2024
1 parent f4637e0 commit 421ddc0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions units/blockdev@.target
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@
[Unit]
Description=Block Device Preparation for %f
Documentation=man:systemd.special(7)

DefaultDependencies=no
Conflicts=umount.target
Before=umount.target

StopWhenUnneeded=yes

0 comments on commit 421ddc0

Please sign in to comment.