#!/bin/sh
#
# PostgreSQL post install script written by Ronald Joe Record (rr@sco.com)
# for use with the UnixWare 7 releases of PostgreSQL
#
# Check to see that SHMMAX is high enough
#

CONFIG_H=/etc/conf/cf.d/config.h
export CONFIG_H
SHMMAX=`grep SHMMAX $CONFIG_H | awk ' { print $3 } '`
export SHMMAX

[ "$SHMMAX" ] && {
    [ $SHMMAX -lt 1236992 ] && {
        /etc/conf/bin/idtune -m SHMMAX 10485760
        /etc/conf/bin/idbuild
    }
}

[ -x /usr/bin/doctool ] && {
    /usr/bin/doctool --add UWDeveloper/PostgresqlDoc.desktop > /dev/null 2>&1
}
[ -x /usr/man/bin/makewhatis ] && {
    /usr/man/bin/makewhatis /usr/man/cat1 > /dev/null 2>&1
    /usr/man/bin/makewhatis /usr/man/cat5 > /dev/null 2>&1
    /usr/man/bin/makewhatis /usr/man/catl > /dev/null 2>&1
}

# Don't enable startup at boot time
#

#[ -x /etc/init.d/postgresql ] && {
#     /etc/init.d/postgresql enable > /dev/null 2>&1
#}

exit 0
