diff --git a/debian/qubes-core-agent.postinst b/debian/qubes-core-agent.postinst index bac2646..920be66 100755 --- a/debian/qubes-core-agent.postinst +++ b/debian/qubes-core-agent.postinst @@ -208,9 +208,7 @@ case "${1}" in splash-manager \ start-ttys \ tty ; do - if [ -e /etc/init/${init}.conf ]; then - mv -f /etc/init/${init}.conf /etc/init/${init}.conf.disabled - fi + dpkg-divert --divert /etc/init/${init}.conf.qubes-disabled --package qubes-core-agent --rename --add /etc/init/${init}.conf done # Stops Qt form using the MIT-SHM X11 Shared Memory Extension @@ -267,9 +265,7 @@ case "${1}" in # exit 0 #fi - if [ -e /etc/init/serial.conf ] && ! [ -f /var/lib/qubes/serial.orig ] ; then - cp /etc/init/serial.conf /var/lib/qubes/serial.orig - fi + dpkg-divert --divert /etc/init/serial.conf.qubes-orig --package qubes-core-agent --rename --add /etc/init/serial.conf # Remove most of the udev scripts to speed up the VM boot time # Just leave the xen* scripts, that are needed if this VM was diff --git a/debian/qubes-core-agent.prerm b/debian/qubes-core-agent.prerm index dc126e6..502a13a 100755 --- a/debian/qubes-core-agent.prerm +++ b/debian/qubes-core-agent.prerm @@ -42,6 +42,16 @@ if [ "$1" = "remove" ] ; then if [ -e /var/lib/qubes/serial.orig ] ; then mv /var/lib/qubes/serial.orig /etc/init/serial.conf fi + + for init in plymouth-shutdown \ + prefdm \ + splash-manager \ + start-ttys \ + tty ; do + dpkg-divert --divert /etc/init/${init}.conf.qubes-disabled --package qubes-core-agent --remove /etc/init/${init}.conf + done + + dpkg-divert --divert /etc/init/serial.conf.qubes-orig --package qubes-core-agent --remove /etc/init/serial.conf fi # dh_installdeb will replace this with shell code automatically