#! /sbin/sh
########
#  Product: InternetSrvcs
#  Fileset: INETSVCS-DTC
#  unconfigure
#  @(#) $Revision: 1.2.212.1 $
########
#
# (c) Copyright Hewlett-Packard Company, 1993
#
########
#
# Standard initialization
#

UTILS="/usr/lbin/sw/control_utils"
if [[ ! -f $UTILS ]]
then
       echo "ERROR: Cannot find $UTILS"
       exit 1
fi
. $UTILS
exitval=$SUCCESS				# Anticipate success

#######
#
# Start of INETSVCS-DTC unconfigure process
#

daemons="ocd"
files="/var/adm/dpp_login.bin /var/adm/utmp.dfa /var/adm/ocd*"

#
#       Kill ocd daemons
#

for i in $daemons
do
	if ! kill_named_procs $i
	then
		echo "WARNING: Could not kill all $i processes."
		exitval=$WARNING
	fi
done

#
#       Remove run-time created files
#

for i in $files
do
	rm -f $i
done

#
#       Remove created device files
#

if [ -d /dev/telnet ]
then
	rm -rf /dev/telnet
fi

#
#       Remove files potentially copied out of /usr/examples by the
#       administrator
#

if [ -d /etc/ddfa ]
then
	rm -rf /etc/ddfa
fi

exit $exitval
