#!/bin/sh
#
# $Source: /mit/olcdev/mkserv/RCS/olc.del,v $
# $Author: bert $
# $Header: /mit/olcdev/mkserv/RCS/olc.del,v 2.1 1998/03/07 07:36:02 bert Exp $
#

#### Configuration variables

Oconf=/etc/athena/olc
Ospool=/usr/spool/olc
olc_syslog=local6	# facility for OLC logging

aliases=/etc/aliases
syslog_conf=/etc/syslog.conf
newsyslog_conf=/etc/athena/newsyslog.conf

case "`machtype`" in
  decmips) syslog_conf=/etc/nsyslog.conf ;;
     sun4) aliases=/etc/mail/aliases ;;
esac

#### Point things out

## olcm feed
if egrep -s "olcm" ${aliases}; then
    echo "===> You should remove the mail feeds for olcm."	>> ${LOGFILE}
else
    : # olcm doesn't exist in aliases file.
fi

#### Fix configuration files

## syslog.conf
if egrep -s "^${olc_syslog}" ${syslog_conf}; then
    echo "Editing ${syslog_conf}."
    egrep -v "^${olc_syslog}" ${syslog_conf} > ${syslog_conf}.tmp
    mv -f ${syslog_conf}.tmp ${syslog_conf}
else
    : # Not editing ${syslog_conf}.
fi

## newsyslog.conf
if egrep -s "^${Ospool}/admin/syslog" ${newsyslog_conf}; then
    echo "Editing ${newsyslog_conf}."
    egrep -v "^${Ospool}/admin/syslog" ${newsyslog_conf} >${newsyslog_conf}.tmp
    mv -f ${newsyslog_conf}.tmp ${newsyslog_conf}
else
    : # Not editing ${newsyslog_conf}.
fi

#### rc.conf variables

echo "conf OLC default"		>> ${CONFCNG}

#### final comment

cat >> ${LOGFILE} << EOF
===> When you have archived all data that needs it, you can remove the
===>   contents of ${Oconf} and ${Ospool}.
===> You can also move or delete all Discuss meeting archives.
EOF

exit 0
