Package: dh-systemd Version: 1.22 Severity: normal --- Please enter the report below this line. ---
I have a package which contains the following debian/<package>.service file and uses dh-systemd: > [Unit] > Description=Package description > > [Service] > Type=oneshot > ExecStart=/usr/lib/<package>/bin/some-tool > > [Install] > WantedBy=multi-user.target When installing the package, then purging and removing it using dpkg, a dangling symlink is left on the system: /etc/systemd/system/multi-user.target.wants/<package>.service -> /lib/systemd/system/<package>.service A snippet like this should basically do the work (similar to what can be found in lxdm 0.5.1-1 postrm in current unstable): > # Test if /etc/systemd/system/<package>.service is broken now > SERVICE_FILE=/etc/systemd/system/<service>.service > if [ -L $SERVICE_FILE ] && [ ! -e $SERVICE_FILE ]; then > echo "WARN: clearing dangling symlink $SERVICE_FILE" >&2 > rm -f $SERVICE_FILE > fi --- System information. --- Architecture: amd64 Kernel: Linux 3.16.0-4-amd64 Debian Release: 8.0 500 stable-updates ftp.cz.debian.org 500 stable security.debian.org 500 stable ftp.cz.debian.org 100 jessie-backports ftp.cz.debian.org --- Package information. --- Package's Depends field is empty. Package's Recommends field is empty. Package's Suggests field is empty.
signature.asc
Description: OpenPGP digital signature

