It really seems to be dh_installsystemd/13.6ubuntu1
You can quick compare this:
root@j-vm:~# grep mount /var/lib/dpkg/info/qemu-block-extra*
/var/lib/dpkg/info/qemu-block-extra.list:/lib/systemd/system/run-qemu.mount
/var/lib/dpkg/info/qemu-block-extra.md5sums:3cf5dc7461348db7d58b6b99b5878731 lib/systemd/system/run-qemu.mount
/var/lib/dpkg/info/qemu-block-extra.postinst: if deb-systemd-helper debian-installed 'run-qemu.mount'; then
/var/lib/dpkg/info/qemu-block-extra.postinst: deb-systemd-helper unmask 'run-qemu.mount' >/dev/null || true
/var/lib/dpkg/info/qemu-block-extra.postinst: if deb-systemd-helper --quiet was-enabled 'run-qemu.mount'; then
/var/lib/dpkg/info/qemu-block-extra.postinst: deb-systemd-helper enable 'run-qemu.mount' >/dev/null || true
/var/lib/dpkg/info/qemu-block-extra.postinst: deb-systemd-helper update-state 'run-qemu.mount' >/dev/null || true
/var/lib/dpkg/info/qemu-block-extra.postinst: deb-systemd-invoke $_dh_action 'run-qemu.mount' >/dev/null || true
/var/lib/dpkg/info/qemu-block-extra.postinst:# dh_installsystemd will not fully enable or start .mount units, but we want
/var/lib/dpkg/info/qemu-block-extra.postinst: systemctl enable 'run-qemu.mount' >/dev/null || true
/var/lib/dpkg/info/qemu-block-extra.postinst: deb-systemd-invoke start 'run-qemu.mount' >/dev/null || true
/var/lib/dpkg/info/qemu-block-extra.postrm: deb-systemd-helper mask 'run-qemu.mount' >/dev/null || true
/var/lib/dpkg/info/qemu-block-extra.postrm: deb-systemd-helper purge 'run-qemu.mount' >/dev/null || true
/var/lib/dpkg/info/qemu-block-extra.postrm: deb-systemd-helper unmask 'run-qemu.mount' >/dev/null || true
/var/lib/dpkg/info/qemu-block-extra.postrm:case $1 in (purge) if systemctl is-active -q run-qemu.mount; then systemctl stop run-qemu.mount || true; fi; rm -rf "/run/qemu";; esac
/var/lib/dpkg/info/qemu-block-extra.prerm: deb-systemd-invoke stop 'run-qemu.mount' >/dev/null || true
root@m-vm:~# grep mount /var/lib/dpkg/info/qemu-block-extra*
/var/lib/dpkg/info/qemu-block-extra.list:/lib/systemd/system/run-qemu.mount
/var/lib/dpkg/info/qemu-block-extra.md5sums:3cf5dc7461348db7d58b6b99b5878731 lib/systemd/system/run-qemu.mount
/var/lib/dpkg/info/qemu-block-extra.postinst:# dh_installsystemd will not fully enable or start .mount units, but we want
/var/lib/dpkg/info/qemu-block-extra.postinst: systemctl enable 'run-qemu.mount' >/dev/null || true
/var/lib/dpkg/info/qemu-block-extra.postinst: deb-systemd-invoke start 'run-qemu.mount' >/dev/null || true
/var/lib/dpkg/info/qemu-block-extra.postrm:case $1 in (purge) if systemctl is-active -q run-qemu.mount; then systemctl stop run-qemu.mount || true; fi; rm -rf "/run/qemu";; esac
The criticial bit is this line:
/var/lib/dpkg/info/qemu-block-extra.postinst:63: deb-systemd-invoke $_dh_action 'run-qemu.mount' >/dev/null || true
This is the full section:
# End automatically added section
# Automatically added by dh_installsystemd/13.6ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -d /run/systemd/system ]; then systemctl --system daemon-reload >/dev/null || true
if [ -n "$2" ]; then _dh_action=restart else _dh_action=start
fi deb-systemd-invoke $_dh_action 'run-qemu.mount' >/dev/null || true
fi
fi
# End automatically added section
So on "configure" (which is called on upgrade) this will call
deb-systemd-invoke $_dh_action 'run-qemu.mount'
with
_dh_action=restart
That is ... wrong
--no-restart-on-upgrade should prevent this, but doesn't
It really seems to be dh_installsyste md/13.6ubuntu1
You can quick compare this: dpkg/info/ qemu-block- extra* dpkg/info/ qemu-block- extra.list: /lib/systemd/ system/ run-qemu. mount dpkg/info/ qemu-block- extra.md5sums: 3cf5dc7461348db 7d58b6b99b58787 31 lib/systemd/ system/ run-qemu. mount dpkg/info/ qemu-block- extra.postinst: if deb-systemd-helper debian-installed 'run-qemu.mount'; then dpkg/info/ qemu-block- extra.postinst: deb-systemd-helper unmask 'run-qemu.mount' >/dev/null || true dpkg/info/ qemu-block- extra.postinst: if deb-systemd-helper --quiet was-enabled 'run-qemu.mount'; then dpkg/info/ qemu-block- extra.postinst: deb-systemd-helper enable 'run-qemu.mount' >/dev/null || true dpkg/info/ qemu-block- extra.postinst: deb-systemd-helper update-state 'run-qemu.mount' >/dev/null || true dpkg/info/ qemu-block- extra.postinst: deb-systemd-invoke $_dh_action 'run-qemu.mount' >/dev/null || true dpkg/info/ qemu-block- extra.postinst: # dh_installsystemd will not fully enable or start .mount units, but we want dpkg/info/ qemu-block- extra.postinst: systemctl enable 'run-qemu.mount' >/dev/null || true dpkg/info/ qemu-block- extra.postinst: deb-systemd-invoke start 'run-qemu.mount' >/dev/null || true dpkg/info/ qemu-block- extra.postrm: deb-systemd-helper mask 'run-qemu.mount' >/dev/null || true dpkg/info/ qemu-block- extra.postrm: deb-systemd-helper purge 'run-qemu.mount' >/dev/null || true dpkg/info/ qemu-block- extra.postrm: deb-systemd-helper unmask 'run-qemu.mount' >/dev/null || true dpkg/info/ qemu-block- extra.postrm: case $1 in (purge) if systemctl is-active -q run-qemu.mount; then systemctl stop run-qemu.mount || true; fi; rm -rf "/run/qemu";; esac dpkg/info/ qemu-block- extra.prerm: deb-systemd-invoke stop 'run-qemu.mount' >/dev/null || true
root@j-vm:~# grep mount /var/lib/
/var/lib/
/var/lib/
/var/lib/
/var/lib/
/var/lib/
/var/lib/
/var/lib/
/var/lib/
/var/lib/
/var/lib/
/var/lib/
/var/lib/
/var/lib/
/var/lib/
/var/lib/
/var/lib/
root@m-vm:~# grep mount /var/lib/ dpkg/info/ qemu-block- extra* dpkg/info/ qemu-block- extra.list: /lib/systemd/ system/ run-qemu. mount dpkg/info/ qemu-block- extra.md5sums: 3cf5dc7461348db 7d58b6b99b58787 31 lib/systemd/ system/ run-qemu. mount dpkg/info/ qemu-block- extra.postinst: # dh_installsystemd will not fully enable or start .mount units, but we want dpkg/info/ qemu-block- extra.postinst: systemctl enable 'run-qemu.mount' >/dev/null || true dpkg/info/ qemu-block- extra.postinst: deb-systemd-invoke start 'run-qemu.mount' >/dev/null || true dpkg/info/ qemu-block- extra.postrm: case $1 in (purge) if systemctl is-active -q run-qemu.mount; then systemctl stop run-qemu.mount || true; fi; rm -rf "/run/qemu";; esac
/var/lib/
/var/lib/
/var/lib/
/var/lib/
/var/lib/
/var/lib/
The criticial bit is this line: dpkg/info/ qemu-block- extra.postinst: 63: deb-systemd-invoke $_dh_action 'run-qemu.mount' >/dev/null || true
/var/lib/
This is the full section: md/13.6ubuntu1
systemctl --system daemon-reload >/dev/null || true
_dh_ action= restart
else
_dh_ action= start
deb-systemd- invoke $_dh_action 'run-qemu.mount' >/dev/null || true
# End automatically added section
# Automatically added by dh_installsyste
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -d /run/systemd/system ]; then
if [ -n "$2" ]; then
fi
fi
fi
# End automatically added section
So on "configure" (which is called on upgrade) this will call invoke $_dh_action 'run-qemu.mount' restart
deb-systemd-
with
_dh_action=
That is ... wrong on-upgrade should prevent this, but doesn't
--no-restart-