[systemd-devel] alternate cryptsetup

Lennart Poettering lennart at poettering.net
Mon Aug 29 09:46:08 UTC 2016


On Sat, 27.08.16 23:20, Xen (list at xenhideout.nl) wrote:

> How can I notify systemd-cryptsetup.service that cryptsetup has been done in
> a different way, and succeeded?

Why would you do this? Note that systemd-cryptsetup.service is really
just a helper for you, that reads /etc/crypttab for you and sets it
up. If you don't like it you can use any other tool instead, that
reads its config from anywhere else. All that matters for systemd is
that the (unencrypted) block device eventually shows up in udev and
carries the "systemd" tag, and does not have the SYSTEMD_READY=0
property set. How you get there, whether with the
systemd-cryptsetup.service implementation or anything else is really
of no relevance. It's not of any relevance how the service is called
or what it actually does.

Or in other words: if you want to put together your own code for
setting up crypto block devices, go ahead, but there's really need to
call it "systemd-cryptsetup.service", or interface with that
implementation at all. 

> Or, what exit status should systemd-cryptsetup have to signal success?

On UNIX, success is usually indicated by a process exit code of zero.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list