#! /bin/sh
# $Id$
# postinstall for swhoisd
# Copyright (c) 2001 Dan Anderson <dan@drydog.com> All rights reserved.
# See file COPYING for license.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
PATH="/usr/bin:/usr/sbin"
export PATH
INETDCONF=/etc/inetd.conf
LINE='whois	stream	tcp	nowait	root	/usr/local/sbin/in.swhoisd	in.swhoisd'

grep 'swhoisd' $INETDCONF 2>/dev/null
if [ $? -ne 0 ] ; then
	cp -p $INETDCONF $INETDCONF.old
        echo "# Added for swhoisd:" >> $INETDCONF
        echo "$LINE" >> $INETDCONF
fi

