Bug#959917: systemd: unit file Alias= leads to dangling symlink

Christoph Anton Mitterer calestyo at scientia.net
Thu May 7 01:51:15 BST 2020


Package: systemd
Version: 245.5-2
Severity: normal


Hey.

I've just noted the following behaviour.

/lib/systemd/system/smartmontools.service has:
[Install]
WantedBy=multi-user.target
Alias=smartd.service


Which leads to:
# tree /etc/systemd/system
/etc/systemd/system
├── multi-user.target.wants
│   ├── smartd.service -> /lib/systemd/system/smartd.service
│   ├── smartmontools.service -> /lib/systemd/system/smartmontools.service
│   └── ...
├── smartd.service -> /lib/systemd/system/smartmontools.service
...

With /etc/systemd/system/multi-user.target.wants/smartmontools.service being
a dangling symlink to the non-existant /lib/systemd/system/smartd.service .

/etc/systemd/system/smartd.service is however created with the correct
destination.


This stays if one disables/enables the unit, i.e. it's re-created with
the dangling symlink.



Cheers,
Chris.


More information about the Pkg-systemd-maintainers mailing list