Skip to Content.
Sympa Menu

freetds - Re: UserGuide updates

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Steve Langasek <vorlon AT netexpress.net>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: UserGuide updates
  • Date: Mon, 26 Nov 2001 20:39:38 -0600

On Mon, Nov 26, 2001 at 06:04:42PM -0800, Peter Harvey wrote:
> > unixODBC comes with a command-line tool called odbcinst. odbcinst can be
> > used to create/add driver settings and DSN entries from the command line
> > and has been created specifically to help driver makers install their
> > driver.

> Forgot to mention... odbcinst can be used to help configure (or an RPM) to
> automagically add these entries. This is particular useful for the driver
> entry but it can also be handy to get a "test" DSN in there. unixODBC uses
> it
> to automagically add the TXT driver at install time. Just food-for-thought.

And I in fact use this in my packages for Debian. Using Debian's
'debconf' configuration system, the administrator is prompted whether
the odbc driver should be automatically registered; and then the
below script snippet is run. The odbcinst tool is a great aid to
packagers of ODBC drivers!

Cheers,
Steve Langasek
postmodern programmer


# Always add in the postinst, always delete in the prerm -- this way,
# we'll always have a good reference count in odbcinst.ini.
if [ -e /usr/bin/odbcinst ]
then
db_get freetds/addtoodbc || true
if [ "$RET" = "true" ]; then
odbcinst -i -d -f /usr/share/freetds0/odbcinst.ini 1>&2
fi
fi

Attachment: pgp5KVd850e2A.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page