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

exitval=0				# Anticipate success

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

#
#
#######
#
# Start of INETSVCS-INETD configure process
#

#
#        Files created by this INETSVCS-INETD configure script
#

newfiles="/etc/services /etc/protocols /etc/networks /etc/inetd.conf \
          /etc/hosts /etc/rc.config.d/namesvrs /etc/rc.config.d/netdaemons"

#
#        Update configuration files in /etc from /usr/newconfig
#        only if the scripts do not contain user modifications.
#

for file in \
        /etc/services \
	/etc/networks \
        /etc/protocols \
        /etc/inetd.conf \
        /etc/rc.config.d/namesvrs \
        /etc/rc.config.d/netdaemons
do
	newconfig_cp $file
	case  $? in
	  100)
		#       Original not present, but working copy is present
		newconfig_msgs 100
	    ;;
	  103)
                #       Original is present and differs from working copy and
                #       from the new file
		newconfig_msgs 103
	    ;;
	esac
done

#
# Create any directories needed at run or configure time
#
if [ ! -d /var/adm ]; then
	mkdir -p /var/adm
	chmog 0555 bin bin /var/adm
fi

#
# Do the hosts file silently, because who wants to keep the default?
#
newconfig_cp /etc/hosts

#
#######
# Update the live_files for INETSVCS-INETD
#
#   Add new files to the list.
#

#NOTYET for file in $newfiles
#NOTYET do
#NOTYET		swmodify add $file
#NOTYET done


exit $exitval
