postrm is in firebird2.1-super 2.1.4.18393-0.ds2-6build1.
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 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | #!/bin/sh
# postrm script for firebird2.1-super
set -e
if [ -f /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
fi
set -u
# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
FB_VER=2.1
DBAPasswordFile="/etc/firebird/$FB_VER/SYSDBA.password"
SECURITY_DB="/var/lib/firebird/$FB_VER/system/security.fdb"
case "$1" in
purge)
if [ -f /usr/share/debconf/confmodule ]; then
# metaget returns an error "... does not exist" if the last package
# is purged
db_metaget shared/firebird/active_version owners || RET=
if ! (echo "$RET" | grep -q "$FB_VER") ; then
if [ -f "$DBAPasswordFile" ] || [ -f "$SECURITY_DB" ]; then
# clean up security remains?
db_subst shared/firebird/purge_security FB_VER $FB_VER
db_fset shared/firebird/purge_security seen false
db_input critical shared/firebird/purge_security || true
# remove databases?
db_subst shared/firebird/purge_databases FB_VER $FB_VER
db_fset shared/firebird/purge_databases seen false
db_input critical shared/firebird/purge_databases || true
db_go
db_get shared/firebird/purge_security
purge_security=$RET
db_get shared/firebird/purge_databases
purge_databases=$RET
if [ "$purge_security" = 'true' ]; then
if [ -f "$DBAPasswordFile" ]; then
rm "$DBAPasswordFile"
fi
if [ -f "$SECURITY_DB" ]; then
rm "$SECURITY_DB"
fi
fi
if [ "$purge_databases" = 'true' ]; then
DB_DIR="/var/lib/firebird/$FB_VER/data"
find $DB_DIR -type f \( -name "*.fdb" -o -name "*.fbk" \) \
-exec rm '{}' \;
fi
fi
fi
else
echo "debconf unavailable."
echo "NOT purging password file ($DBAPasswordFile)"
echo "NOT purging security database ($SECURITY_DB)"
echo "NOT purging databases in /var/lib/firebird/$FB_VER/data"
fi
;;
esac
# Automatically added by dh_installinit
if [ "$1" = "purge" ] ; then
update-rc.d firebird2.1-super remove >/dev/null
fi
# End automatically added section
# Automatically added by dh_installdebconf
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
db_purge
fi
# End automatically added section
exit 0
|