debian: postinst: use dpkg-divert
dpkg-divert is not ideal for config files but should work better than direct cp/mv.
This commit is contained in:
parent
4faece9e89
commit
8a9d2378f6
8
debian/qubes-core-agent.postinst
vendored
8
debian/qubes-core-agent.postinst
vendored
@ -208,9 +208,7 @@ case "${1}" in
|
|||||||
splash-manager \
|
splash-manager \
|
||||||
start-ttys \
|
start-ttys \
|
||||||
tty ; do
|
tty ; do
|
||||||
if [ -e /etc/init/${init}.conf ]; then
|
dpkg-divert --divert /etc/init/${init}.conf.qubes-disabled --package qubes-core-agent --rename --add /etc/init/${init}.conf
|
||||||
mv -f /etc/init/${init}.conf /etc/init/${init}.conf.disabled
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Stops Qt form using the MIT-SHM X11 Shared Memory Extension
|
# Stops Qt form using the MIT-SHM X11 Shared Memory Extension
|
||||||
@ -267,9 +265,7 @@ case "${1}" in
|
|||||||
# exit 0
|
# exit 0
|
||||||
#fi
|
#fi
|
||||||
|
|
||||||
if [ -e /etc/init/serial.conf ] && ! [ -f /var/lib/qubes/serial.orig ] ; then
|
dpkg-divert --divert /etc/init/serial.conf.qubes-orig --package qubes-core-agent --rename --add /etc/init/serial.conf
|
||||||
cp /etc/init/serial.conf /var/lib/qubes/serial.orig
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove most of the udev scripts to speed up the VM boot time
|
# 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
|
# Just leave the xen* scripts, that are needed if this VM was
|
||||||
|
10
debian/qubes-core-agent.prerm
vendored
10
debian/qubes-core-agent.prerm
vendored
@ -42,6 +42,16 @@ if [ "$1" = "remove" ] ; then
|
|||||||
if [ -e /var/lib/qubes/serial.orig ] ; then
|
if [ -e /var/lib/qubes/serial.orig ] ; then
|
||||||
mv /var/lib/qubes/serial.orig /etc/init/serial.conf
|
mv /var/lib/qubes/serial.orig /etc/init/serial.conf
|
||||||
fi
|
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
|
fi
|
||||||
|
|
||||||
# dh_installdeb will replace this with shell code automatically
|
# dh_installdeb will replace this with shell code automatically
|
||||||
|
Loading…
Reference in New Issue
Block a user