# common PCP QA configuration parameters
#
# NOTE	each local site will need to either add stuff in here or have
#	a local version of this file
#
# Copyright (c) 1997-2002 Silicon Graphics, Inc.  All Rights Reserved.
#

. ./localconfig

# The ones of interest
#
# PCPQA_CLOSE_X_SERVER
#       host running an X server that allows remote X11 requests and
#       has a low-latency network connection to where the tests are
#	being run
#	Can safely be left unset.
#
# PCPQA_FAR_PMCD
#	a remote host a long way away that should be running pmcd(1)
#	(was important when latency over the slow internet was an
#	issue)
#	Can safely be left unset.
#
# PCPQA_HYPHEN_HOST
#	a remote host that has a hyphen (-) in the hostname and is running
#	pmcd(1) ... you may need to make a local alias in /etc/hosts or
#	equivalent if you don't have a real valid hostname like this.
#	Can safely be left unset.
#
# PCPQA_SOCKS_SERVER
#	the local "socks" server to be used with pmsocks(1) ... may be
#	a hostname or an IP address
#	Can safely be left unset.
#
# PCPQA_CISCO_ROUTER
#	a cisco router that can be monitored with pmdacisco during QA
#	Can safely be left unset.
#

# domain-based defaults
#
domain=`_get_fqdn | sed -e 's/[^.][^.]*\.//'`

PCPQA_CLOSE_X_SERVER=${PCPQA_CLOSE_X_SERVER:-''}
PCPQA_FAR_PMCD=${PCPQA_FAR_PMCD:-''}
PCPQA_HYPHEN_HOST=${PCPQA_HYPHEN_HOST:-''}
PCPQA_CISCO_ROUTER=${PCPQA_CISCO_ROUTER:-''}
PCPQA_SOCKS_SERVER=$PCPQA_SOCKS_SERVER:-''}
PCPQA_CISCO_ROUTER=${PCPQA_CISCO_ROUTER:-''}

case "$domain"
in
    engr.sgi.com)
	PCPQA_CLOSE_X_SERVER=${PCPQA_CLOSE_X_SERVER:-groan:0}
	PCPQA_FAR_PMCD=${PCPQA_FAR_PMCD:-snort.melbourne.sgi.com}
	PCPQA_HYPHEN_HOST=${PCPQA_HYPHEN_HOST:-gate-babylon}
	PCPQA_SOCKS_SERVER=sgigate.sgi.com
	PCPQA_CISCO_ROUTER=melbourne-l0.wan.sgi.com
	;;

    melbourne.sgi.com)
	PCPQA_CLOSE_X_SERVER=${PCPQA_CLOSE_X_SERVER:-rattle:0}
	PCPQA_FAR_PMCD=${PCPQA_FAR_PMCD:-babylon.engr.sgi.com}
	# foo-bar.melbourne is also known as ptg-gate.melbourne
	PCPQA_HYPHEN_HOST=${PCPQA_HYPHEN_HOST:-foo-bar.melbourne.sgi.com}
	PCPQA_SOCKS_SERVER=sgigate.sgi.com
	PCPQA_CISCO_ROUTER=melbourne-l0.wan.sgi.com
	;;
    engr.acx)
	PCPQA_CLOSE_X_SERVER=:0
	PCPQA_FAR_PMCD=${PCPQA_FAR_PMCD:-web1.drp.acx}
	PCPQA_HYPHEN_HOST=${PCPQA_HYPHEN_HOST:-nathan-laptop}
	PCPQA_CISCO_ROUTER=${PCPQA_CISCO_ROUTER:-cisco}
	;;
    scott.net.au)
	PCPQA_CLOSE_X_SERVER=:0
	PCPQA_FAR_PMCD=${PCPQA_FAR_PMCD:-verge}
	PCPQA_HYPHEN_HOST=${PCPQA_HYPHEN_HOST:-debian-laptop}
	PCPQA_CISCO_ROUTER=${PCPQA_CISCO_ROUTER:-cisco_router}
	;;

    localdomain|localhost|local|\(none\))
	case "`hostname | sed -e 's/\..*//'`"
	in
	    bozo|bozo-laptop|bozo-vm)
		PCPQA_HYPHEN_HOST=bozo-vm
		# LinuxMint
		#PCPQA_CLOSE_X_SERVER=localhost:10.0
		# older Ubuntu
		#PCPQA_CLOSE_X_SERVER=$DISPLAY
		# Ubuntu
		PCPQA_CLOSE_X_SERVER=${DISPLAY-bozo:0}
		PCPQA_SOCKS_SERVER=192.168.1.100
		;;

	    vm*|comma)
		# use bozo for socks and X11 server (unless set already)
		#
		PCPQA_CLOSE_X_SERVER=${DISPLAY-bozo:0}
		PCPQA_SOCKS_SERVER=bozo
		;;

	    # add settings here for your host if the domain is
	    # localdomain, localhost, local or (none)
	    #
	    #myhost)
		# ...
		# ;;

	esac
	;;

    # add settings for your domain here if needed
    #
    #mydomain)
	# ...
	# ;;

esac
