#! /bin/sh

# ----------------------------------------------------------------------
# Copyright (C) 2001, Compaq Computer Corporation
# 
# This file is part of Vesta.
# 
# Vesta is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# 
# Vesta is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with Vesta; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
# ----------------------------------------------------------------------

# Last modified on Mon Jan 17 19:25:25 EST 2005 by ken@xorian.net
#      modified on Mon Aug 10 10:47:39 PDT 1998 by heydon

# process command line
if [ $# -gt 0 ]; then
  echo "SYNTAX: WhichCache"
  exit 1
fi

# set directory names from configuration file
MetaDataRoot=`vgetconfig CacheServer MetaDataRoot`
MetaDataDir=`vgetconfig CacheServer MetaDataDir`
Hostname=`vgetconfig CacheServer Host`
Portnumber=`vgetconfig CacheServer Port`

# set "MetaDataRoot" if empty
if [ -z "$MetaDataRoot" ]; then
  MetaDataRoot=.
fi

# print cache information
CacheDir=$MetaDataRoot/$MetaDataDir
echo "Cache information:"
echo "  Hostname:    $Hostname"
echo "  Port number  $Portnumber"
echo "  Stable root: $CacheDir"
