File tree Expand file tree Collapse file tree 4 files changed +36
-2
lines changed
Expand file tree Collapse file tree 4 files changed +36
-2
lines changed Original file line number Diff line number Diff line change @@ -3933,7 +3933,8 @@ systemgenerator_PROGRAMS += \
39333933 systemd-cryptsetup-generator
39343934
39353935dist_systemunit_DATA += \
3936- units/cryptsetup.target
3936+ units/cryptsetup.target \
3937+ units/cryptsetup-pre.target
39373938
39383939systemd_cryptsetup_SOURCES = \
39393940 src/cryptsetup/cryptsetup.c
Original file line number Diff line number Diff line change 5252 <filename >bluetooth.target</filename >,
5353 <filename >ctrl-alt-del.target</filename >,
5454 <filename >cryptsetup.target</filename >,
55+ <filename >cryptsetup-pre.target</filename >,
5556 <filename >dbus.service</filename >,
5657 <filename >dbus.socket</filename >,
5758 <filename >default.target</filename >,
840841 transaction.</para >
841842
842843 <variablelist >
844+ <varlistentry >
845+ <term ><filename >cryptsetup-pre.target</filename ></term >
846+ <listitem >
847+ <para >This passive target unit
848+ may be pulled in by services
849+ that want to run before any
850+ encrypted block device is set
851+ up. All encrypted block
852+ devices are set up after this
853+ target has been reached. Since
854+ the shutdown order is
855+ implicitly the reverse
856+ start-up order between units
857+ this target is particularly
858+ useful to ensure that a
859+ service is shut down only
860+ after all encrypted block
861+ devices are fully
862+ stopped.</para >
863+ </listitem >
864+ </varlistentry >
843865 <varlistentry >
844866 <term ><filename >local-fs-pre.target</filename ></term >
845867 <listitem >
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ static int create_disk(
127127 "Conflicts=umount.target\n"
128128 "BindsTo=dev-mapper-%i.device\n"
129129 "IgnoreOnIsolate=true\n"
130- "After=systemd-readahead-collect.service systemd-readahead-replay.service\n" ,
130+ "After=systemd-readahead-collect.service systemd-readahead-replay.service cryptsetup-pre.target \n" ,
131131 f );
132132
133133 if (!nofail )
Original file line number Diff line number Diff line change 1+ # This file is part of systemd.
2+ #
3+ # systemd is free software; you can redistribute it and/or modify it
4+ # under the terms of the GNU Lesser General Public License as published by
5+ # the Free Software Foundation; either version 2.1 of the License, or
6+ # (at your option) any later version.
7+
8+ [Unit]
9+ Description=Encrypted Volumes (Pre)
10+ Documentation=man:systemd.special(7)
11+ RefuseManualStart=yes
You can’t perform that action at this time.
0 commit comments