summaryrefslogtreecommitdiff
path: root/qa/222
blob: 60dcbbd07761a56b1086535e8a489aa512f0b7a9 (plain)
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
#! /bin/sh
# PCP QA Test No. 222
# Check symlinks in $PCP_PMDAS_DIR
#
# Copyright (c) 1995-2002 Silicon Graphics, Inc.  All Rights Reserved.
#

seq=`basename $0`
echo "QA output created by $seq"

# get standard filters
. ./common.product
. ./common.filter

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

# real QA test starts here
echo "expect no output ..."

if [ ! -d $PCP_PMDAS_DIR ]
then
    echo "No $PCP_PMDAS_DIR dir?"
    exit 1
fi

cd $PCP_PMDAS_DIR

for dir in *
do
    if [ $dir = "irix" ]
    then
	continue
    fi

    if [ -L $dir ]
    then
	if [ ! -d $dir ]
	then
	    echo "Error: symlink $PCP_PMDAS_DIR/$dir -> nowhere?"
	fi
    elif [ -d $dir ]
    then
	if [ ! -L /usr/pcp/pmdas/$dir -a -d /usr/pcp/pmdas/$dir ]
	then
	    echo "Error: $dir directory in both /usr/pcp and /var/pcp!"
	fi
    else
	echo "Error: what is $PCP_PMDAS_DIR/$dir?"
    fi

done

# all done
exit