#!/bin/sh set -e log_debug() { echo "Debug: piuparts exception for package $PIUPARTS_OBJECTS" } case ${PIUPARTS_OBJECTS%%=*} in amd64-libs|amd64-libs-dev) # leaves a superfluous empty line after purge log_debug sed -i '3{/^$/d}' /etc/ld.so.conf ;; localepurge) case ${PIUPARTS_DISTRIBUTION} in lenny*|squeeze*) ;; *) # reinstall packages where files might have been dropped log_debug EXTRA="" apt-get -u --reinstall --fix-missing install $(dpkg -S LC_MESSAGES 'man/??/man' | cut -d: -f1 | tr ', ' '\n' | sort -u) $EXTRA ;; esac ;; logcheck|\ checksecurity) case "$PIUPARTS_DISTRIBUTION" in stretch) if [ -f /etc/logcheck/ignore.d.server/libsasl2-modules ]; then # logcheck chowns/chmods the /etc/logcheck tree log_debug chgrp -v root /etc/logcheck /etc/logcheck/ignore.d.server /etc/logcheck/ignore.d.server/libsasl2-modules chmod -v g-s,o+rx /etc/logcheck/ignore.d.server/ fi ;; esac ;; sasl2-bin|\ libapache2-mod-authn-sasl) case "$PIUPARTS_DISTRIBUTION" in stretch) # unowned directory in jessie may disappear after removal of owning packages in stretch if [ ! -d /usr/lib/sasl2 ]; then log_debug mkdir -v -p /usr/lib/sasl2 fi ;; esac ;; virtualbox-ext-pack) #802143: virtualbox-ext-pack leaves VBoxSVC processes running # these should terminate within 5 seconds if not used log_debug sleep 10 ;; esac if [ -f /var/run/piuparts-stamp-dkms-installed ]; then rm /var/run/piuparts-stamp-dkms-installed # if dkms built a kernel module, there might be a # leftover 'sleep' process from progress reporting sleep 3 fi