Skip to content
Snippets Groups Projects
Commit 9be0bf96 authored by Guido Günther's avatar Guido Günther
Browse files

Remove old restart handling code from postinst

This brings the dh_installinit calls in line with the dh_systemd_start
calls.

Closes: #739096
Thanks: Laurent Bigonville
parent aa5cd194
No related branches found
No related tags found
No related merge requests found
......@@ -96,28 +96,6 @@ case "$1" in
add_users_groups
add_statoverrides
# libvirt from 0.6.0 on is safe to restart with running vms:
if [ -n "$2" ] && dpkg --compare-versions "$2" ge 0.6.0; then
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d libvirt-bin stop
else
/etc/init.d/libvirt-bin stop
fi
sleep 1
fi
if dpkg --compare-versions "$2" lt "0.6.1-2"; then
if [ -e /etc/rc2.d/S20libvirt-bin ] && \
[ -e /etc/rc3.d/S20libvirt-bin ] && \
[ -e /etc/rc4.d/S20libvirt-bin ] && \
[ -e /etc/rc5.d/S20libvirt-bin ] && \
[ -e /etc/rc0.d/K20libvirt-bin ] && \
[ -e /etc/rc1.d/K20libvirt-bin ] && \
[ -e /etc/rc6.d/K20libvirt-bin ]; then
update-rc.d -f libvirt-bin remove >/dev/null
fi
fi
# Make sure the directories don't get removed on package removal since
# logrotate chokes otherwise.
for dir in qemu uml lxc; do
......
......@@ -156,7 +156,7 @@ override_dh_install:
override_dh_installinit:
dh_systemd_enable
dh_installinit --name=libvirt-bin --no-restart-on-upgrade -- defaults 28 72
dh_installinit --name=libvirt-bin --restart-after-upgrade -- defaults 28 72
dh_installinit --name=libvirt-guests --no-restart-on-upgrade -- defaults 29 71
dh_systemd_start --restart-after-upgrade
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment