[systemd-devel] When is a unit "loaded"?
Daniel Wang
wonderfly at google.com
Thu Jul 12 00:16:26 UTC 2018
I have a unit, say foo.service, on my system that's in
/usr/lib/systemd/system, but disabled by preset. On system boot, it doesn't
show as "loaded" per `systemctl --all | grep foo`. So if I override it with
a file with the same name but under /etc/systemd/system, `systemctl cat
foo.service` will show the one under /etc without the need for a `systemctl
daemon-reload`.
If I create another service unit, bar.service, which has a After=
dependency on foo.service, and start bar, foo.service will show as loaded.
And then if I try to override it, `systemctl cat foo.service` will print a
warning saying a daemon-reload is needed.
Nothings seems incorrect, but I have a few questions:
- Which units are loaded on-boot and which are not?
- Is the After= dependency alone enough to have systemd load a unit? Are
there any other dependency directives that will result in the same effect?
--
Best,
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180711/e4c1adf6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4849 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180711/e4c1adf6/attachment.bin>
More information about the systemd-devel
mailing list