[systemd-devel] after=local-fs not enforced
Lennart Poettering
lennart at poettering.net
Fri Nov 25 16:11:36 UTC 2016
On Thu, 24.11.16 16:20, Benoit SCHMID (Benoit.Schmid at unige.ch) wrote:
> Hello,
>
> We have defined the following sap_XXX.service.
> It contains the following in [Unit]:
> ###
> After=local-fs.target network-online.target ora_lsnr_XXX.service
> remote-fs.target
> Wants=ora_lsnr_XXX.service
> ###
Note that After=local-fs.target is redundant for regular
services. ("Regular" being defined here as service which do not set
DefaultDependencies=no). This is because if DefaultDependencies=yes is
set (which is the implied default for all services), then they gain an
ordering dep on basic.target which in turn is ordered against
local-fs.target. Hence, because ordering deps are transitive all
regular services are indirectly also ordered against local-fs.target.
The only case where you explicitly want to list "local-fs.target" in
your configuration is when you set DefaultDependencies=no and want to
become an early-boot service. Also see the bootup(7) man page about
this.
Note that in older systemd versions at least only mounts created via
/etc/fstab are ordered against "local-fs.target" by default. Mounts
created manually during runtime (by invoking /bin/mount for example)
are not.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list