#! /bin/sh
#
# convenience wrapper for dbmcli
#
# sets LD_ASSUME_KERNEL if started on a 2.6 kernel system and calls
# dbmcli through rlwrap to enable command history if rlwrap is
# installed
#
# (c) 2004 Martin Kittel <debian@martin-kittel.de>
#

DBMCLICMD=dbmcli

# currently MaxDB's own task handling can't work with NPTL
if [ "`uname -r | cut -b-3`" = "2.6" ]; then
    export LD_ASSUME_KERNEL=2.2.5
fi

if [ -x /usr/bin/rlwrap ]; then
    exec rlwrap $DBMCLICMD $@
else
    exec $DBMCLICMD $@
fi
