#!/bin/bash
# vim:set sw=4 ts=4:
#
###############################################################
# 
# $Id: list_alice_files,v 1.3 2005/04/11 14:14:34 fabian Exp $
#
#############################################################################
#
# ALICE
# Automatic Linux Installation and Configuration Environment
#
# Copyright (c) 2000-2002 SuSE Linux Solutions AG, Eschborn, Germany
#               2002-2004 SuSE Linux AG, Eschborn, Germany
#               2005           SUSE GmbH, Nuernberg, Germany
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
#############################################################################
#
# Author: 
#
###############################################################
# 
# (c) 2003 Fabian Herschel
# GPL
#
###############################################################
# 
# usage: list_alice_files hostname
#
###############################################################
# 
# Notes:
# ALICE_HOME should contain the path of your
# local working copy of the alice repository
# to be scanned
#
get_all_config_files()
{
    typeset fqhn=$1 alice_host_classes="${SYS_OS_VENDOR}_${SYS_OS}_${SYS_OS_VERSION} ${SYS_LOCATION} ${SYS_ALICE_CLASSES}"
    cd $ALICE_HOME
    ls -1 templates/*.tcf
    for cls in $alice_host_classes
    do
	ls -1 classes/$cls.*.tcf
    done
    ls -1 info/$fqhn.*.tcf 
}	
#
# set the hostname, so the alicerc lib
# initialises correctly also set alice_dir
# to the normal and central alice_dir :-)
#
fqhn=$1
alice_dir=/usr/lib/alice
. /usr/lib/alice/lib/alicerc 1>/dev/null
#
GET_CONFIGURATION sys
get_all_config_files $fqhn
