]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units/blockdev@.target: conflict with umount.target
authorMike Yuan <me@yhndnzj.com>
Tue, 26 Sep 2023 22:26:38 +0000 (06:26 +0800)
committerLennart Poettering <lennart@poettering.net>
Wed, 27 Sep 2023 10:33:40 +0000 (12:33 +0200)
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

units/blockdev@.target

index 1c8650635139f5a6e04c16ef8abbf9bd4ae669f7..f4034d30a50d736e3b70a0a7f3b68d61c816a2ac 100644 (file)
@@ -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