Simple reproducer:
$ cat /lib/systemd/system/selfalias.service [Unit] Description=alias to self
[Service] ExecStart=/bin/true
[Install] WantedBy=multi-user.target Alias=selfalias.service
$ sudo DPKG_MAINTSCRIPT_PACKAGE=1 deb-systemd-helper enable selfalias.service $ sudo mv /lib/systemd/system/selfalias.service{,.removed} $ sudo _DEB_SYSTEMD_HELPER_DEBUG=1 DPKG_MAINTSCRIPT_PACKAGE=1 deb-systemd-helper mask selfalias.service
Simple reproducer:
$ cat /lib/systemd/ system/ selfalias. service
[Unit]
Description=alias to self
[Service]
ExecStart=/bin/true
[Install] multi-user. target .service
WantedBy=
Alias=selfalias
$ sudo DPKG_MAINTSCRIP T_PACKAGE= 1 deb-systemd-helper enable selfalias.service system/ selfalias. service{ ,.removed} HELPER_ DEBUG=1 DPKG_MAINTSCRIP T_PACKAGE= 1 deb-systemd-helper mask selfalias.service
$ sudo mv /lib/systemd/
$ sudo _DEB_SYSTEMD_