#!/sbin/sh
#
# MIT SGI RC script. Installation assumes this file does not change.
# Customize behavior in rc.conf.
#
# Tom Coppeto
# MIT Network Group
# 9/27/94
#
# $Source: /afs/net/project/netconf/sgi_52/7.7tom/src/misc/RCS/athena,v $
# $Author: nocuser $
#

IS_ON=/sbin/chkconfig
if $IS_ON verbose ; then
    ECHO=echo
else            # For a quiet startup and shutdown
    ECHO=:
fi


if $IS_ON zhm && test -x /etc/athena/zhm; then
                				$ECHO "zhm.."
	/etc/athena/zhm &
fi

if [ -f /bin/athena/detach ]; then
        /bin/athena/detach -a
        cp /dev/null /usr/tmp/attachtab
fi

if $IS_ON afsclient; then
	/etc/athena/config_afs
fi

if $IS_ON syspack && test -f /etc/config/syspack.options; then
						$ECHO "syspack.."
	syspack=`cat /etc/config/syspack.options`
	/bin/athena/attach -f $syspack
fi

if $IS_ON notify || $IS_ON update; then
        					$ECHO " checking for updates\c"
        if [ -x /usr/athena/etc/update_check ]; then
                /etc/athena/update_check
        elif [ -x /etc/athena/update_check ]; then
                /etc/athena/update_checkn
        fi
fi

exit 0
