Merge branch 'master' of https://github.com/kmcdonell/pcp into kenj-merge
[pcp.git] / qa / 222
blobacd9d2cbcc17e551a4ca841292111b48e67ad8d8
1 #! /bin/sh
2 # PCP QA Test No. 222
3 # Check symlinks in $PCP_PMDAS_DIR
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard filters
12 . ./common.product
13 . ./common.filter
15 status=0
16 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
18 # real QA test starts here
19 echo "expect no output ..."
21 if [ ! -d $PCP_PMDAS_DIR ]
22 then
23 echo "No $PCP_PMDAS_DIR dir?"
24 exit 1
27 cd $PCP_PMDAS_DIR
29 for dir in *
31 if [ -L $dir ]
32 then
33 if [ ! -d $dir ]
34 then
35 echo "Error: symlink $PCP_PMDAS_DIR/$dir -> nowhere?"
37 elif [ -d $dir ]
38 then
39 if [ ! -L /usr/pcp/pmdas/$dir -a -d /usr/pcp/pmdas/$dir ]
40 then
41 echo "Error: $dir directory in both /usr/pcp and /var/pcp!"
43 else
44 echo "Error: what is $PCP_PMDAS_DIR/$dir?"
47 done
49 # all done
50 exit