[systemd-devel] How to prevent an initramfs service from being stopped at switch-root ?

Mantas Mikulėnas grawity at gmail.com
Mon Jan 11 06:30:31 PST 2016


On Mon, Jan 11, 2016 at 3:38 PM, John Lane <systemd at jelmail.com> wrote:

> On 11/01/16 13:09, Tomasz Torcz wrote:
> > On Mon, Jan 11, 2016 at 12:39:10PM +0000, John Lane wrote:
> >> I have some services in my initramfs that unlock some crypto volumes to
> >> make the root and some other filesystems available.
> >   This seems relevant:
> > https://wiki.freedesktop.org/www/Software/systemd/RootStorageDaemons/
> >
> Yeah, I read that. But it doesn't explain how to configure a unit. I
> read the bit about processes where the first character of the zeroth
> command line argument is '@' are excluded from the killing spree, but
> not sure how to do that from a unit specification file.


This is primarily meant to be done by daemons themselves, and I'm really
not sure if it works when done "externally" from a .service – but worth a
try:

ExecStart=@/usr/bin/myservice @myservice --option --option
KillMode=none

(The two "@"s have different meanings – the first one is documented in
systemd.service, the second in RootStorageDaemons.)

-- 
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20160111/54f3d519/attachment-0001.html>


More information about the systemd-devel mailing list