lintian: warn when (systemd) service units install themselves into an unusual target

Sam Morris sam at robots.org.uk
Wed Mar 9 15:37:42 GMT 2016


[I used the wrong address in the X-Debbugs-CC pseudoheader, forwarding
manually.]

I noticed that haveged.service installs itself with
WantedBy=default.target, rather than multi-user.target.

This lintian check warns when a service unit is WantedBy=
something other than {sysinit,multi-user,graphical}.target.

Would pkg-systemd-maintainers care to comment on whether this is a good
idea and/or whether there are likely to be too many false positives? I
ran the following on my system:

    systemctl --no-legend list-unit-files -t service | while read unit rest; do w=$(systemctl cat "$unit" | grep ^WantedBy=); for x in $w; do printf '%s %s\n' $x "$unit"; done; done

and the false positives were from systemd itself, bluez and anacron.

-- 
Sam Morris <https://robots.org.uk/>
CAAA AA1A CA69 A83A 892B  1855 D20B 4202 5CDA 27B9

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-systemd-warn-if-services-are-WantedBy-an-unusual-tar.patch
Type: text/x-diff
Size: 1843 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/attachments/20160309/c1db5ac6/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/attachments/20160309/c1db5ac6/attachment.sig>


More information about the Pkg-systemd-maintainers mailing list