[arch-general] Configuring enabled services

Gesh gesh at gesh.uni.cx
Thu Mar 27 04:41:01 EDT 2014


On March 27, 2014 9:25:24 AM GMT+02:00, "Thomas Bächler" <thomas at archlinux.org> wrote:
>Am 26.03.2014 23:13, schrieb Gesh:
>> Thanks for the pointers.
>> If I understand what's going on correctly, units specify in their
>[Install] section whether, when they're enabled, they should be pulled
>in by other units.
>> Those symlinks usually populate the appropriate directory under
>/etc/systemd/system/.
>> Besides that, some packages install symlinks under
>/usr/lib/systemd/system/ as part of their files to get pulled in by
>other units without requiring user intervention.
>
>What this means for backing up the configuration is that you simply
>back
>up /etc/systemd/system without resolving symlinks (and ignore that
>those
>symlinks point to paths outside of your backup). rsync can do that for
>you. This has the benefit of also backing up all permanent unit
>overrides and drop-ins that the admin may have made.

Basically, if I understood what happens correctly, the units under /etc/systemd/system/*.wants/ - or their targets, if they're symlinks - replace their corresponding units in the dependency graph.
In addition, all unit files are installed to /usr/lib/systemd/system/, and the symlinks must have the same name as their targets, so only the symlinks' names need to be backed up.
Therefore, only what's under /etc/systemd/system/ needs to be backed up, ignoring symlinks' targets.
Besides that, the .wants directories in /usr/lib/systemd/system/ are managed by pacman, and represent upstream decisions to automatically start their units.
Is this understanding correct?
Thank you for your time,
Gesh


More information about the arch-general mailing list