1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
#!/bin/sh
set -e
log_debug() {
echo "Debug: piuparts exception for package $PIUPARTS_OBJECTS"
}
is_installed()
{
local pkg="$1"
dpkg-query -s "$pkg" >/dev/null 2>&1 || return 1
local status="$(dpkg-query -W -f '${Status}' $pkg)"
test "$status" != "unknown ok not-installed" || return 1
test "$status" != "deinstall ok config-files" || return 1
return 0
}
case ${PIUPARTS_OBJECTS%%=*} in
apt-listbugs) log_debug
# when installed apt-listbugs is run on installations / upgrades
# and will cause them to fail due to prompting
# if packages being installed currently have RC bugs.
# so disable it here.
dpkg-divert --rename /usr/sbin/apt-listbugs
ln -svf /bin/true /usr/sbin/apt-listbugs
;;
esac
if is_installed dkms; then
# remember for post_purge_exceptions
touch /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
for pgconf in /etc/postgresql/*/main/postgresql.conf
do
test -f "$pgconf" && test -r "$pgconf" || continue
port=$(awk '/^port/ { print $3 }' "$pgconf")
if [ "-n" $port ] && [ "$port" != "5432" ]
then
echo "Non-default port in $pgconf"
fi
done
|