Make deb-systemd-helper work on template units

WantedBy and RequiredBy require an instance and so only work on uninstantiated templates with a specified DefaultInstance. Aliases and Also work exactly the same as for non-template units.

This patch does not enable changing template instantiations, so, for example, deb-systemd-helper enable getty@tty2.service will still fail.

I've checked using Devel::DumpTrace that all the correct links are listed for both template and non-template units, but a unit test would be even better. If the code looks alright, I can give that a try as well.

Merge request reports

Loading