#! /bin/sh # PCP QA Test No. 456 # # Bug #591459: incomplete control file for cron.pm* # # 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 . ./common.check . ./localconfig signal=$PCP_BINADM_DIR/pmsignal status=1 # failure is the default! LOCALHOST=`hostname | sed -e 's/\..*//'` FULLLOCALHOST=`hostname` hostsfile="/etc/hosts" trap "_cleanup; exit \$status" 0 1 2 3 15 _filter() { sed \ -e 's/\.\.\.*/[dots]/' \ -e "s/$FULLLOCALHOST/LOCALHOST/g" \ -e "s/$LOCALHOST/LOCALHOST/g" \ -e "s/localhost/LOCALHOST/g" \ -e "s/local:/LOCALHOST/g" \ -e 's/control:[0-9][0-9]*]/control:LINE]/' \ -e 's;/usr/var;/var;g' \ -e "s;$tmp;TMP;g" \ -e '/Duplicate/d' \ | _filter_cron_scripts } _stop_loggers() { $sudo $signal -a -s TERM pmlogger } _cleanup() { echo echo "Cleaning up" _stop_loggers >/dev/null 2>&1 cd # get out of tmp directory so we can delete it $sudo rm -rf $tmp $sudo $PCP_BINADM_DIR/pmlogger_check } _setup() { _stop_loggers cd rm -rf $tmp mkdir $tmp } # real QA test starts here _setup # control file # cat >$tmp/control <&1 | _filter echo echo "--------------" echo "PMLOGGER.DAILY" echo "--------------" $sudo $PCP_BINADM_DIR/pmlogger_daily -V -c $tmp/control 2>&1 | _filter # success, all done status=0 exit