From 362c378291e85df3e00aaad491d1e08233ad127f Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Tue, 3 Dec 2019 09:49:09 +0100 Subject: [PATCH] cryptsetup: umount encrypted devices before detaching it during shutdown This is done by ordering local-fs-pre.target and remote-fs-pre.target after cryptsetup.target and remote-cryptsetup.target respectively. Fixes: #8472 --- man/bootup.xml | 25 ++++++++++++++++--------- units/local-fs-pre.target | 1 + units/remote-fs-pre.target | 1 + 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/man/bootup.xml b/man/bootup.xml index d3715234000..55b3eb8a332 100644 --- a/man/bootup.xml +++ b/man/bootup.xml @@ -92,17 +92,24 @@ -local-fs-pre.target +(various cryptsetup + devices...) | v -(various mounts and (various swap (various cryptsetup - fsck services...) devices...) devices...) (various low-level (various low-level - | | | services: udevd, API VFS mounts: - v v v tmpfiles, random mqueue, configfs, - local-fs.target swap.target cryptsetup.target seed, sysctl, ...) debugfs, ...) - | | | | | - \__________________|_________________ | ___________________|____________________/ - \|/ + cryptsetup.target + | + v + local-fs-pre.target + | + v +(various mounts and (various swap + fsck services...) devices...) (various low-level (various low-level + | | services: udevd, API VFS mounts: + v v tmpfiles, random mqueue, configfs, + local-fs.target swap.target seed, sysctl, ...) debugfs, ...) + | | | | + \__________________|_________________ _________________|______________________/ + \ / v sysinit.target | diff --git a/units/local-fs-pre.target b/units/local-fs-pre.target index 9aca15b9538..e9a1f188bf3 100644 --- a/units/local-fs-pre.target +++ b/units/local-fs-pre.target @@ -11,3 +11,4 @@ Description=Local File Systems (Pre) Documentation=man:systemd.special(7) RefuseManualStart=yes +After=cryptsetup.target diff --git a/units/remote-fs-pre.target b/units/remote-fs-pre.target index 3f22605c8c7..b4a68c73dd6 100644 --- a/units/remote-fs-pre.target +++ b/units/remote-fs-pre.target @@ -11,3 +11,4 @@ Description=Remote File Systems (Pre) Documentation=man:systemd.special(7) RefuseManualStart=yes +After=remote-cryptsetup.target -- 2.47.3