#!/bin/sh

set -e

case "$1" in
    install|upgrade)
        # Divert libpq-dev's pg_config away so we can install a wrapper that
        # points at the most recent postgresql-server-dev-NN pg_config.
        # This makes a difference when compiling extensions against a PG
        # version that does not match the libpq version.
	dpkg-divert --package postgresql-common --rename --divert /usr/bin/pg_config.libpq-dev --add /usr/bin/pg_config
        ;;

    abort-upgrade)
        ;;

    *)
        echo "$0 called with unknown argument \`$1'" 1>&2
        exit 1
        ;;
esac

# Automatically added by dh_installdeb/13.14.1ubuntu5
dpkg-maintscript-helper rm_conffile /etc/apt/apt.conf.d/01autoremove-postgresql 229\~ postgresql-common -- "$@"
dpkg-maintscript-helper rm_conffile /etc/sysctl.d/30-postgresql-shm.conf 269\~ postgresql-client-common -- "$@"
# End automatically added section
# Automatically added by dh_installinit/13.14.1ubuntu5
if [ "$1" = "install" ] && [ -n "$2" ] && [ -e "/etc/init.d/postgresql" ] ; then
	chmod +x "/etc/init.d/postgresql" >/dev/null || true
fi
# End automatically added section

