From: Zbigniew Jędrzejewski-Szmek Date: Tue, 5 Sep 2017 08:15:13 +0000 (+0200) Subject: units: add remote-cryptsetup.target and remote-cryptsetup-pre.target X-Git-Tag: v235~158^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=889128b8b27abb13e1691a72e4ce0562c564e257;p=platform%2Fupstream%2Fsystemd.git units: add remote-cryptsetup.target and remote-cryptsetup-pre.target The pair is similar to remote-fs.target and remote-fs-pre.target. Any cryptsetup devices which require network shall be ordered after remote-cryptsetup-pre.target and before remote-cryptsetup.target. --- diff --git a/man/systemd.special.xml b/man/systemd.special.xml index 9c916be..2993d67 100644 --- a/man/systemd.special.xml +++ b/man/systemd.special.xml @@ -82,6 +82,8 @@ poweroff.target, printer.target, reboot.target, + remote-cryptsetup-pre.target, + remote-cryptsetup.target, remote-fs-pre.target, remote-fs.target, rescue.target, @@ -478,6 +480,27 @@ + remote-cryptsetup-pre.target + + This target unit is automatically ordered before all cryptsetup devices + marked with the . It can be used to execute additional + units before such devices are set up. + + It is ordered after network.target and + network-online.target, and also pulls the latter in as a + Wants= dependency. + + + + remote-cryptsetup.target + + Similar to cryptsetup.target, but for encrypted + devices which are accessed over the network. It is used for + crypttab8 + entries marked with . + + + remote-fs.target Similar to local-fs.target, but diff --git a/units/cryptsetup-pre.target b/units/cryptsetup-pre.target index 42e35dd..6cb28a6 100644 --- a/units/cryptsetup-pre.target +++ b/units/cryptsetup-pre.target @@ -6,7 +6,7 @@ # (at your option) any later version. [Unit] -Description=Encrypted Volumes (Pre) +Description=Local Encrypted Volumes (Pre) Documentation=man:systemd.special(7) RefuseManualStart=yes Before=cryptsetup.target diff --git a/units/cryptsetup.target b/units/cryptsetup.target index 25d3e33..10b17fd 100644 --- a/units/cryptsetup.target +++ b/units/cryptsetup.target @@ -6,5 +6,5 @@ # (at your option) any later version. [Unit] -Description=Encrypted Volumes +Description=Local Encrypted Volumes Documentation=man:systemd.special(7) diff --git a/units/meson.build b/units/meson.build index be32a39..2024d0b 100644 --- a/units/meson.build +++ b/units/meson.build @@ -48,6 +48,9 @@ units = [ ['proc-sys-fs-binfmt_misc.mount', 'ENABLE_BINFMT'], ['reboot.target', '', 'runlevel6.target ctrl-alt-del.target'], + ['remote-cryptsetup-pre.target', 'HAVE_LIBCRYPTSETUP'], + ['remote-cryptsetup.target', 'HAVE_LIBCRYPTSETUP', + join_paths(pkgsysconfdir, 'system/multi-user.target.wants/')], ['remote-fs-pre.target', ''], ['remote-fs.target', '', join_paths(pkgsysconfdir, 'system/multi-user.target.wants/')], diff --git a/units/remote-cryptsetup-pre.target b/units/remote-cryptsetup-pre.target new file mode 100644 index 0000000..a375e61 --- /dev/null +++ b/units/remote-cryptsetup-pre.target @@ -0,0 +1,15 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Remote Encrypted Volumes (Pre) +Documentation=man:systemd.special(7) +RefuseManualStart=yes +Before=remote-cryptsetup.target + +After=network.target network-online.target +Wants=network-online.target diff --git a/units/remote-cryptsetup.target b/units/remote-cryptsetup.target new file mode 100644 index 0000000..60943bd --- /dev/null +++ b/units/remote-cryptsetup.target @@ -0,0 +1,10 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Remote Encrypted Volumes +Documentation=man:systemd.special(7)