postinst is in tdsodbc 0.91-6+b1.
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 | #!/bin/sh
set -e
# Source debconf library.
. /usr/share/debconf/confmodule
db_version 2.0
# Always add in the postinst, always delete in the prerm -- this way,
# we'll always have a good reference count in odbcinst.ini.
db_get freetds/addtoodbc || true
if [ "$RET" = "true" ]; then
odbcinst -i -d -f /usr/share/tdsodbc/odbcinst.ini 1>&2
fi
if dpkg --compare-versions "$2" lt-nl 0.82-1; then
# on upgrade from older versions, this file will be left around,
# preventing removal of the directory; do a one-time cleanup.
rm -f /var/lib/odbc/freetds.removed
[ ! -d /var/lib/odbc ] || rmdir --ignore-fail-on-non-empty /var/lib/odbc
fi
|