#!/bin/ksh
#
#ident  "@(#)privatenetlist.ksh 1.1     01/07/18 SMI"
#
# Copyright (c) 2001 by Sun Microsystems, Inc.
# All rights reserved.
#

# This script is used to list Sun Cluster private interconnect adapters
# configured in the current node. 
# The script will first check what is the hostname this script is running on
# to determine the nodename, then return the list of adapter_name(s) that is
# configured as SC private interconnect, by running scconf -pv command.
# 

NODE_NAME=`/usr/bin/hostname`


/usr/cluster/bin/scconf -pv | grep -i "transport adapter:" | grep "($NODE_NAME)" | nawk '{print $5}' > /tmp/scconf_output 

cat /tmp/scconf_output

if [ $? -ne 0 ]
then
	/bin/rm -rf /tmp/scconf_output*
	return 1 
else
	/bin/rm -rf /tmp/scconf_output*
	return 0 
fi

