Index: debian/univention-system-setup.install =================================================================== --- debian/univention-system-setup.install (Revision 56006) +++ debian/univention-system-setup.install (Arbeitskopie) @@ -2,3 +2,4 @@ usr/lib/univention-system-setup/scripts usr/lib/univention-system-setup/cleanup-post.d usr/lib/univention-system-setup/cleanup-pre.d +usr/lib/univention-system-setup/appliance-hooks.d Index: debian/univention-system-setup-boot.install =================================================================== --- debian/univention-system-setup-boot.install (Revision 56006) +++ debian/univention-system-setup-boot.install (Arbeitskopie) @@ -1,6 +1,5 @@ usr/share/univention-system-setup/startxwithfirefox usr/share/univention-system-setup/download-packages -usr/lib/univention-system-setup/appliance-hooks.d etc/init.d usr/lib/univention-system-setup/addons var/www Index: debian/univention-system-setup-boot.postinst =================================================================== --- debian/univention-system-setup-boot.postinst (Revision 56006) +++ debian/univention-system-setup-boot.postinst (Arbeitskopie) @@ -83,4 +83,15 @@ update-rc.d -f urandom remove rm /var/lib/urandom/random-seed +# generate package removal appliance hook +cat >/usr/lib/univention-system-setup/appliance-hooks.d/95_remove_package_cache <<__EOF__ +#!/bin/sh +if [ -s /var/cache/univention-system-setup/profile ]; then + rm -f /var/cache/univention-system-setup/packages/*.deb + rm -f /var/cache/univention-system-setup/packages/Packages + rm -f /etc/apt/sources.list.d/05univention-system-setup.list +fi +__EOF__ +chmod 755 /usr/lib/univention-system-setup/appliance-hooks.d/95_remove_package_cache + exit 0 Index: debian/univention-system-setup-boot.postrm =================================================================== --- debian/univention-system-setup-boot.postrm (Revision 56006) +++ debian/univention-system-setup-boot.postrm (Arbeitskopie) @@ -54,10 +54,4 @@ #DEBHELPER# -if [ "$1" = remove -o "$1" = purge ]; then - rm -f /var/cache/univention-system-setup/packages/*.deb - rm -f /var/cache/univention-system-setup/packages/Packages - rm -f /etc/apt/sources.list.d/05univention-system-setup.list -fi - exit 0 Index: debian/univention-system-setup.postinst =================================================================== --- debian/univention-system-setup.postinst (Revision 56006) +++ debian/univention-system-setup.postinst (Arbeitskopie) @@ -37,4 +37,8 @@ chmod -R 700 /var/cache/univention-system-setup +if dpkg --compare-versions "$2" lt-nl "8.1.64-1" && [ ! -e /var/univention-join/joined ]; then + ucr unset --force update/available +fi + exit 0