#!/sbin/sh
#
#       @(#)sysidtool.sh 1.2 02/08/06 SMI
#
# Copyright (c) 1992-2001 Sun Microsystems, Inc.  
# All Rights Reserved. Sun
#

#*****	S30sysid.net
# Configure the network interface. Invoke sysidnet, which gets hostname
# & if on net, IP address
#
# invoke sysidnet, which gets hostname & if on net, IP address
#

SYSIDNET="/usr/sbin/sysidnet -y"
if [ ! -f /tmp/.manual-sysid ] ; then
        eval "$SYSIDNET"
else
	echo "Would have run $SYSIDNET"
	/sbin/sh
fi

# Security Policy: Kerberos Authentication.
SYSIDKRB5="/usr/sbin/sysidkrb5 -m"
if [ ! -f /tmp/.manual-sysid ] ; then
	eval "$SYSIDKRB5"
else
	echo "Would have run $SYSIDKRB5"
	/sbin/sh
fi

#*****	S71rpc
#
# Run the pertinent startup activities for the rpc facility:
#	1) sysidns
#	2) keyserv
#
echo "Starting remote procedure call (RPC) services:\c"

SYSIDNS="/usr/sbin/sysidns -y"
if [ ! -f /tmp/.manual-sysid ] ; then
	echo " sysidns\c"
	eval "$SYSIDNS"
else
	echo
	echo "Would have run $SYSIDNS"
	/sbin/sh
fi

# NOTE:	/var/nis/$hostname will never exist at this point
# 
if [ -f /var/nis/NIS_COLD_START ]; then
	echo " keyserv\c"
	/usr/sbin/keyserv > /dev/console 2>&1
fi

echo " done."

#*****	S71sysid.sys
#
# invoke sysidsys, which completes configuration of various system attributes.
#
SYSIDSYS="/usr/sbin/sysidsys"
if [ ! -f /tmp/.manual-sysid ] ; then
	eval "$SYSIDSYS"
else
	echo "Would have run $SYSIDSYS"
	/sbin/sh
fi
