[Pkg-systemd-maintainers] Bug#719695: Prefer symlinks over Alias= for non-matching service names

Michael Stapelberg stapelberg at debian.org
Wed Aug 14 12:11:47 BST 2013


Package: systemd
Version: 204-2
Severity: normal

In case the name of a SysV init script does not correspond to the name
of the systemd service file (e.g. /etc/init.d/network-manager, but
/lib/systemd/system/NetworkManager.service, where the dash in the middle
is the problem), we previously recommended people to use Alias=, e.g.
Alias=network-manager.service in this case.

The issue with that is that the Alias= symlinks are enabled and disabled
by systemctl enable|disable (also by deb-systemd-helper), whereas they
should _always_ be present.

Upstream suggested to just use a symlink, so that is what I am
proposing. In the case of NetworkManager, we should ship

/lib/systemd/system/network-manager.service -> NetworkManager.service

Any objections so far?

In case of service files that contain an @ (for instances), e.g.
stud at .service, we should ship a symlink that masks the SysV init script:

/lib/systemd/system/stud.service -> /dev/null

Any objections? Otherwise I’ll go ahead and update the Systemd/Packaging
wiki page with the best practice on that.




More information about the Pkg-systemd-maintainers mailing list