| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
# Source debconf library. |
| 6 |
. /usr/share/debconf/confmodule |
| 7 |
|
| 8 |
db_version 2.0 |
| 9 |
|
| 10 |
# Always add in the postinst, always delete in the prerm -- this way, |
| 11 |
# we'll always have a good reference count in odbcinst.ini. |
| 12 |
db_get freetds/addtoodbc || true |
| 13 |
if [ "$RET" = "true" ]; then |
| 14 |
odbcinst -i -d -f /usr/share/tdsodbc/odbcinst.ini 1>&2 |
| 15 |
fi |
| 16 |
|
| 17 |
if dpkg --compare-versions "$2" lt-nl 0.82-1; then |
| 18 |
# on upgrade from older versions, this file will be left around, |
| 19 |
# preventing removal of the directory; do a one-time cleanup. |
| 20 |
rm -f /var/lib/odbc/freetds.removed |
| 21 |
[ ! -d /var/lib/odbc ] || rmdir --ignore-fail-on-non-empty /var/lib/odbc |
| 22 |
fi |
| 23 |
|
| 24 |
#DEBHELPER# |