# @(#)94 1.10  src/bos/usr/lib/boot/network/link_methods.sh, cmdnim, bos720  7/26/02  08:08:40
# IBM_PROLOG_BEGIN_TAG 
# This is an automatically generated prolog. 
#  
# bos720 src/bos/usr/lib/boot/network/link_methods.sh 1.10 
#  
# Licensed Materials - Property of IBM 
#  
# Restricted Materials of IBM 
#  
# COPYRIGHT International Business Machines Corp. 1996,2002 
# All Rights Reserved 
#  
# US Government Users Restricted Rights - Use, duplication or 
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 
#  
# IBM_PROLOG_END_TAG 
#
#   COMPONENT_NAME: CMDNIM
#
#   FUNCTIONS: link_methods
#
#   ORIGINS: 27
#
#
#   (C) COPYRIGHT International Business Machines Corp. 1996
#   All Rights Reserved
#   Licensed Materials - Property of IBM
#   US Government Users Restricted Rights - Use, duplication or
#   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#
#


##################### MAIN ########################
set +x

# This function is called for both a bos_inst and a diag network boot.
# This function creates links for selected device types and classes.
# This provides a means to control which devices are configured, which
# saves time and system resources.  Links are from the remotely mounted
# filesystem which is mounted over /SPOT to the /usr/lib/methods directory.

if [[ ${RC_CONFIG} = /etc/rc.bos_inst ]]
then

	# get required methods for bos_inst boot

	# link methods for disks, pdisks, and LVM and their possible parents
	# link methods for tapes and their possible parents
	# link methods for cdrom and possible parents
	# link methods for diskette and keyboard and their possible parents
	# link methods for tty and lft and their possible parents
	# link methods for graphics adapters (Common Character Mode)
	#   and their possible parents
	# link methods for devices having "link_meth" attributes and their
	#   possible parents (default action - no command flag to get this)
	# link all methods identified by a "load_module" attribute
	/SPOT/usr/lib/boot/network/link_meth -c disk -c pdisk -c lvm -c tape -c cdrom -c diskette -c keyboard -c tty -c lft -g -m -r "/SPOT"

else

	# get required methods for diag boot

	# link methods for disk and pdisk and their possible parents
	# link methods for tape and possible parents
	# link methods for cdrom and possible parents
	# link methods for rwoptical and possible parents
	# link methods for diskette and keyboard and their possible parents
	# link methods for tty and lft and their possible parents
	# link methods for graphics adapters (full function graphics mode)
	#   and their possible parents
	# link methods for devices having "link_meth_diag" attributes and
	#   their possible parents
	# link methods for devices having "link_meth" attributes and their
	#   possible parents (default action - no command flag to get this)
	# link all methods identified by a "load_module" attribute
	/SPOT/usr/lib/boot/network/link_meth -c disk -c pdisk -c tape -c cdrom -c rwoptical -c diskette -c keyboard -c tty -c lft -G -d -m -r "/SPOT"

fi


# Now see if there is a platform specific link_methods script to run

# get the platform
platform=`/SPOT/usr/sbin/bootinfo -p`

# call platform specific link_methods if it exists
if [[ -s /SPOT/usr/lib/boot/network/link_methods_${platform} ]]
then
    /SPOT/usr/lib/boot/network/link_methods_${platform}
fi

exit 0
