#!/bin/sh
#
#	$Id: sipbserv84.del,v 1.1 2000/10/29 22:44:27 mhpower Exp $
#	$Revision: 1.1 $
#	$Platforms: sun4,sgi$

mach=`/bin/athena/machtype`
INETDIR=/etc/athena

# make sure /srvd exists, and if not, try to attach it
if [ ! -d /srvd ]; then
	echo "Couldn't find /srvd, so am going to attach it..."
	attach -O athena-genericsys
fi

# get back the default inetd.conf
if [ ! -f $INETDIR/inetd.conf.old ]; then
	cp $INETDIR/inetd.conf $INETDIR/inetd.conf.old
fi
cp /srvd$INETDIR/inetd.conf $INETDIR/inetd.conf

# go back to running xlogin
case "$mach" in
sun4)
	if [ ! -f /etc/inittab.old ]; then
		cp /etc/inittab /etc/inittab.old
	fi
	cp /srvd/etc/inittab /etc/inittab
	;;
sgi)
	if [ ! -r /etc/rc2.d/S98xdm ]; then
		ln -s /etc/init.d/axdm /etc/rc2.d/S98xdm
	fi
	echo "===> Don't forget to reenable a graphics console in NVRAM."
	;;

# cleanup syslogging type stuff

if [ ! -f /etc/syslog.conf.old ]; then
	cp /etc/syslog.conf /etc/syslog.conf.old
fi
cp /srvd/etc/syslog.conf /etc/syslog.conf

echo "conf RVDCLIENT default"	>> ${CONFCNG}
echo "conf MRUPDATE default"	>> ${CONFCNG}

exit 0




