#!/bin/sh
#############################################################################
# Copyright (C)2004-2005, Sun Microsystems Inc. All rights reserved.
# Use is subject to license terms.
#
# Name: list_components
# Description: Common function to list various components

# pragma ident	"$Id: list_components.sh"
##############################################################################

# control logging method
#
#log=echo
log="logger -pdaemon.err"


service_names=$*

for service in $service_names
do
    if [ "${service}" != "framework" ] ; then
        
        ### Validate the service ###
        svc_dir=/usr/lib/cc-cfw/$service
        if [ ! -d $svc_dir ] ; then
            $log $service not a valid service
            exit 1
        fi

        echo Components of the service : $service
        ### Service name passed in, display the components of this service ###

        if [ ! -d /usr/lib/cc-cfw/$service ] ; then
            $log $service not available
            exit 1
        fi
        echo `ls /usr/lib/cc-cfw/$service`
    fi
done


