[systemd-devel] What unit file should I depend on?

Lennart Poettering lennart at poettering.net
Wed Feb 1 19:39:09 PST 2012


On Wed, 01.02.12 18:51, Manuel Amador (rudd-o at rudd-o.com) wrote:

> So:
> 
> * Requires=ZFS.service in local-fs.target
>   (accomplished using a symlink to ZFS.service in local-fs.target.requires)
> 
> * Before=local-fs.target in ZFS.service
> 
> * After=fedora-storage-init-late.service in ZFS.service
> 
> That way
> 
> -- local-fs.target is required, pulling in ZFS.service and f-s-i-l.service --
> 
> -- f-s-i-l.service happens --
> 
> -- ZFS.service happens --
> 
> -- local-fs.target is reached  --
> 
> upon boot, right?

No, not unless you also add a DefaultDependencies=no in there. Otherwise
your service will be ordered after basic.target which is ordered after
local-fs.target, which means you run into a dep loop.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list