postrm is in cloudkitty-common 7.0.0-4.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | #!/bin/sh
set -e
### Start of included pkgos_postrm library
#!/bin/sh
# -*- mode: shell-script -*-
# Perform cleanups when removing a package
# Prototype: pkgos_postrm <template-prefix-name> <package-name> $@
# Example: pkgos_postrm neutron neutron-common $@
pkgos_dbc_postrm () {
local PKPRM_TEMPLATE_PREFIX PKPRM_PACKAGE_NAME
PKPRM_TEMPLATE_PREFIX=${1}
PKPRM_PACKAGE_NAME=${2}
shift
shift
if [ -f /usr/share/debconf/confmodule ] ; then
. /usr/share/debconf/confmodule
# If the package has the template, then it means we're having a db,
# and therefore we can call the dbconfig-common clean function.
db_get ${PKPRM_TEMPLATE_PREFIX}/configure_db
if [ "$RET" = "true" ] ; then
if [ -f /usr/share/dbconfig-common/dpkg/postrm ] ; then
. /usr/share/dbconfig-common/dpkg/postrm
dbc_go ${PKPRM_PACKAGE_NAME} $@
else
rm -f /etc/dbconfig-common/${PKPRM_PACKAGE_NAME}.conf
if which ucf >/dev/null 2>&1; then
ucf --purge /etc/dbconfig-common/${PKPRM_PACKAGE_NAME}.conf
ucfr --purge ${PKPRM_PACKAGE_NAME} /etc/dbconfig-common/${PKPRM_PACKAGE_NAME}.conf
fi
fi
fi
fi
rm -rf /var/lib/${PKPRM_TEMPLATE_PREFIX} /var/log/${PKPRM_TEMPLATE_PREFIX} /var/lock/${PKPRM_TEMPLATE_PREFIX}
}
### End of included pkgos_postrm library
if [ "${1}" = "purge" ] ; then
pkgos_dbc_postrm cloudkitty cloudkitty-common $@
[ -e /var/lib/cloudkitty ] && rm -rf /var/lib/cloudkitty
[ -e /var/log/cloudkitty ] && rm -rf /var/log/cloudkitty
for i in cloudkitty.conf api_paste.ini policy.json ; do
if [ -e "/etc/cloudkitty/${i}" ] ; then
rm /etc/cloudkitty/${i}
fi
done
rmdir --ignore-fail-on-non-empty /etc/cloudkitty || true
fi
# Automatically added by dh_installdebconf/11.1.6ubuntu1
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
db_purge
fi
# End automatically added section
|