2015-02-05 03:14:41 +01:00
|
|
|
#!/bin/sh
|
2014-10-31 06:59:20 +01:00
|
|
|
# postrm script for core-agent-linux
|
|
|
|
#
|
|
|
|
# see: dh_installdeb(1)
|
|
|
|
|
2014-11-07 06:08:26 +01:00
|
|
|
set -e
|
2014-10-31 06:59:20 +01:00
|
|
|
|
|
|
|
# The prerm script may be called in the following ways:
|
|
|
|
# * <postrm> 'remove'
|
|
|
|
# * <postrm> 'purge'
|
|
|
|
# * <old-postrm> 'upgrade' <new-version>
|
|
|
|
# * <disappearer's-postrm> 'disappear' <overwriter> <overwriter-version>
|
|
|
|
#
|
|
|
|
# The postrm script is called after the package's files have been removed
|
|
|
|
# or replaced. The package whose postrm is being called may have previously been
|
|
|
|
# deconfigured and only be "Unpacked", at which point subsequent package changes
|
|
|
|
# do not consider its dependencies. Therefore, all postrm actions may only rely
|
|
|
|
# on essential packages and must gracefully skip any actions that require the
|
|
|
|
# package's dependencies if those dependencies are unavailable.[48]
|
|
|
|
#
|
|
|
|
# * <new-postrm> 'failed-upgrade' <old-version>
|
|
|
|
#
|
|
|
|
# Called when the old postrm upgrade action fails. The new package will be
|
|
|
|
# unpacked, but only essential packages and pre-dependencies can be relied on.
|
2015-10-15 04:34:55 +02:00
|
|
|
# Pre-dependencies will either be configured or will be "Unpacked" or
|
2014-10-31 06:59:20 +01:00
|
|
|
# "Half-Configured" but previously had been configured and was never removed.
|
|
|
|
#
|
|
|
|
# * <new-postrm> 'abort-install'
|
|
|
|
# * <new-postrm> 'abort-install' <old-version>
|
|
|
|
# * <new-postrm> 'abort-upgrade' <old-version>
|
|
|
|
#
|
|
|
|
# Called before unpacking the new package as part of the error handling of
|
|
|
|
# preinst failures. May assume the same state as preinst can assume.
|
|
|
|
#
|
|
|
|
# For details, see http://www.debian.org/doc/debian-policy/ or
|
|
|
|
# https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html or
|
|
|
|
# the debian-policy package
|
|
|
|
|
2014-11-08 00:26:21 +01:00
|
|
|
if [ "${1}" = "remove" ] ; then
|
2015-02-05 03:14:41 +01:00
|
|
|
/usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas > /dev/null 2>&1 || :
|
2014-10-31 06:59:20 +01:00
|
|
|
|
|
|
|
if [ -L /lib/firmware/updates ]; then
|
|
|
|
rm /lib/firmware/updates
|
|
|
|
fi
|
2014-11-08 00:26:21 +01:00
|
|
|
|
|
|
|
for srv in qubes-dvm qubes-sysinit qubes-misc-post qubes-netwatcher qubes-network qubes-qrexec-agent; do
|
|
|
|
systemctl disable ${srv}.service
|
|
|
|
done
|
2014-10-31 06:59:20 +01:00
|
|
|
fi
|
|
|
|
|
2015-07-18 15:05:15 +02:00
|
|
|
if [ "$1" = "purge" ]; then
|
|
|
|
dpkg-statoverride --remove /var/lib/qubes/dom0-updates || test $? -eq 2
|
|
|
|
fi
|
|
|
|
|
2014-10-31 06:59:20 +01:00
|
|
|
# dh_installdeb will replace this with shell code automatically
|
|
|
|
# generated by other debhelper scripts.
|
|
|
|
|
|
|
|
#DEBHELPER#
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
# vim: set ts=4 sw=4 sts=4 et :
|