summaryrefslogtreecommitdiffstats
path: root/share/scripts/debconf
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2017-05-09 14:42:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2017-05-09 14:42:40 +0000
commitebf49a23977f1ec3131e21695f379ad98de816b7 (patch)
tree07cb812f422305a03808063c2a0520f1d76250bc /share/scripts/debconf
parentReleasing debian version 20170405-1. (diff)
downloadopen-infrastructure-compute-tools-ebf49a23977f1ec3131e21695f379ad98de816b7.tar.xz
open-infrastructure-compute-tools-ebf49a23977f1ec3131e21695f379ad98de816b7.zip
Merging upstream version 20170510.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/scripts/debconf')
-rwxr-xr-xshare/scripts/debconf12
1 files changed, 11 insertions, 1 deletions
diff --git a/share/scripts/debconf b/share/scripts/debconf
index e4c342e..dee4dcd 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -184,9 +184,19 @@ Cleanup_system ()
{
DIRECTORY="${1}"
- Chroot "${DIRECTORY}" "apt-get --yes autoremove"
+ Chroot "${DIRECTORY}" "apt-get --yes --purge autoremove"
Chroot "${DIRECTORY}" "apt-get clean"
+ CRUFT="$(Chroot "${DIRECTORY}" "dpkg --get-selections | awk '/deinstall$/ { print $1 }'")"
+
+ if [ -n "${CRUFT}" ]
+ then
+ for PACKAGE in ${CRUFT}
+ do
+ Chroot "${DIRECTORY}" "apt-get purge ${PACKAGE}"
+ done
+ fi
+
# Cleanup
rm -f "${DIRECTORY}/etc/dpkg/dpkg.cfg.d/container-tools"
rm -f "${DIRECTORY}/usr/sbin/policy-rc.d"