#!/bin/sh
#############################################################################
# Copyright (C)2004-2005, Sun Microsystems Inc. All rights reserved.
# Use is subject to license terms.
#
# Name: check_ccr
# Description: Script to verify SUNWccccr package installation and the 
# required files. 

# pragma ident	
##############################################################################

################################################################################
#  Function of the check_ccr
#  1.  Check for the presence of SUNWccccr
#  2.  Make sure the command line interface ccr is available
#  2.  Exits with a 0 on success and 1 on failure.
#################################################################################

#
# control logging method
#
#log=echo
log="logger -pdaemon.err"
    
### Make sure that the package SUNWccccr is installed. ###
pkginfo SUNWccccr > /dev/null
if [ $? -ne 0 ] ; then
    $log "The package 'SUNWccccr' is not installed"
    exit 1
fi 

#
# If the package exists, make sure that the command line interface ccr is available.
#
cli="/usr/lib/cc-ccr/bin/ccr"
if [ ! -f $cli ]  ; then
    $log "The command line interface  $cli does not exist"
    exit 1
fi 


