File: common.install.cisco

package info (click to toggle)
pcp 6.3.8-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 235,180 kB
  • sloc: ansic: 1,253,622; sh: 173,998; xml: 160,490; cpp: 83,331; python: 20,482; perl: 18,302; yacc: 6,886; makefile: 2,955; lex: 2,862; fortran: 60; java: 52
file content (101 lines) | stat: -rwxr-xr-x 2,093 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/bin/sh
#
# Install the Cisco PMDA for PCP QA
#
# Copyright (c) 1997-2002 Silicon Graphics, Inc.  All Rights Reserved.
#

tmp=/var/tmp/$$
status=0
trap "rm -f $tmp; exit \$status" 1 2 3 15

. ./common.rc

# need localconfig
#
if [ ! -f localconfig ]
then
    if ./mk.localconfig
    then
	:
    else
	echo "Arrggh: Cannot make localconfig ... fix the PCP QA installation first!"
	status=1
	exit
    fi
fi

. ./localconfig

#DEBUG# echo PCP_VER=$PCP_VER

__here=`pwd`
cd $2

# melbourne-l0 (was wanptg) should have no password ... complain to
# noc@corp.sgi.com if one re-appears
#
# in Mtn View, here is the scoop from shambel@sgi.com on 14 Mar 2000
#	The router that's on the other side of the ptg connection is
#	intl2.corp.sgi.com which has no user level password.  Will this
#	work for you?  When this router goes away (sometime later this
#	year) you can use the user level password thed00rs on almost
#	any of the cisco's in your region and most of the wan routers
#	on the wanring here in Mt View.
#
#  Note: PCP_QA_CISCOROUTER needs to be defined in common.rc

#  This is done to quickly get a fully qualified hostname, either from
#  hostname(1), or pmhostname(1)
__hostnma=`$PCP_BINADM_DIR/pmhostname`
__hostnmb=`hostname`
__suprhostname=`echo "" | awk -v __hostnma="$__hostnma" -v __hostnmb="$__hostnmb" '
END {
    if (length(__hostnma) > length(__hostnmb)) print __hostnma
    else print __hostnmb
}'`
case "$__suprhostname"
in
    #  TEMPORARY: include engr and americas until a replacement for
    #  b43-11-cisco6-168.corp can be found.
    #
    *.melbourne.*|*.engr.*|*.americas.*)
	cat <<End-of-File >$tmp
both
$PCP_QA_CISCOROUTER

End-of-File
	if [ "$PCP_VER" -gt 20200 ]
	then
	    echo >>$tmp
	fi
	cat <<End-of-File >>$tmp
s2/2
s2/2.1
e1/0
quit

End-of-File
	#DEBUG# cat $tmp
	$sudo ./Install <$tmp >>$__here/$1.out
    ;;

#    *.engr.*)
#	cat <<End-of-File | $sudo ./Install >>$__here/$1.out
#b43-11-cisco6-168.corp
#
#
#
#
#
#quit
#
#End-of-File
#	;;

    *)
	echo "Error: don't know how to install cisco PMDA on host `$PCP_BINADM_DIR/pmhostname`"
	exit 1
	;;
esac