#!/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