[systemd-devel] alternate cryptsetup

Lennart Poettering lennart at poettering.net
Tue Aug 30 11:29:50 UTC 2016


On Mon, 29.08.16 18:18, Xen (list at xenhideout.nl) wrote:

> Lennart Poettering schreef op 29-08-2016 11:46:
> >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
> 
> Alright, so if I add a udev rule it should show up. Regular
> systemd-cryptsetup keeps complaining that devices (from crypttab) haven't
> been found and it enters failed status for those devices. Thanks for
> sharing. I have found it impossible to turn systemd-cryptsetup off.

You may mask the "cryptsetup-generator" binary. See systemd.generator(7).

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list