Discussion:
Enablement symlink path for built-in units
(too old to reply)
Daniel Wang
2018-03-10 19:41:26 UTC
Permalink
Raw Message
I am puzzled by the fact that while symlinks for most builtin units are
installed at /usr/lib/systemd/system, a few are linked at
/etc/systemd/system, for example, systemd-networkd.service and
systemd-timesyncd.service.

https://github.com/systemd/systemd/blob/master/units/meson.build#L187:L191

Why the difference?
--
Best,
Daniel
Mantas Mikulėnas
2018-03-10 20:32:17 UTC
Permalink
Raw Message
Post by Daniel Wang
I am puzzled by the fact that while symlinks for most builtin units are
installed at /usr/lib/systemd/system, a few are linked at
/etc/systemd/system, for example, systemd-networkd.service and
systemd-timesyncd.service.
https://github.com/systemd/systemd/blob/master/units/meson.build#L187:L191
Why the difference?
Symlinks in /usr are supposed to be essentially fixed: the distro installs
them as part of the package and the unit is always enabled, unless masked.
(Some of them don't even have an [Install] section.)

Symlinks in /etc, meanwhile, are just defaults for someone who installs
from source; the service itself is optional and distros might apply the
same defaults via presets, or via post_install, or not at all. In any case
the admin can still disable networkd and timesyncd using normal commands.
Post by Daniel Wang
--
Mantas Mikulėnas <***@gmail.com>
Sent from my phone
Daniel Wang
2018-03-12 01:25:44 UTC
Permalink
Raw Message
Thanks!
Post by Mantas Mikulėnas
Post by Daniel Wang
I am puzzled by the fact that while symlinks for most builtin units are
installed at /usr/lib/systemd/system, a few are linked at
/etc/systemd/system, for example, systemd-networkd.service and
systemd-timesyncd.service.
https://github.com/systemd/systemd/blob/master/units/
meson.build#L187:L191
Why the difference?
Symlinks in /usr are supposed to be essentially fixed: the distro installs
them as part of the package and the unit is always enabled, unless masked.
(Some of them don't even have an [Install] section.)
Symlinks in /etc, meanwhile, are just defaults for someone who installs
from source; the service itself is optional and distros might apply the
same defaults via presets, or via post_install, or not at all. In any case
the admin can still disable networkd and timesyncd using normal commands.
Post by Daniel Wang
--
Sent from my phone
--
Best,
Daniel
Loading...