#!/bin/sh
# vim:set sw=4 ts=4:
#
# $Id: module_firewall,v 1.5 2005/04/11 14:14:39 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: Fabian Herschel
#
#############################################################################
#
# module_firewall
# module to configure firewalls 
#
# Sections: firewall
# Tags:     FW_CONFIG_MODE
#
############################################################################
#
# configures firewalling software
#
usage()
{
   echo "$_self -h | --help | -?"
   echo "$_self -fqhn fqhn"
}

test -n "$alice_dir" || alice_dir="/usr/lib/alice2/"
export alice_dir

. $alice_dir/lib/alicerc

WELCOME
#
############################################################################
#
while [ $# -gt 0 ]
do
   case $1 in
      -h | --help | -? ) usage
                         exit 1
                         ;;
      -fqhn ) fhqn=$2; shift
              ;;
   esac
   shift
done
#
############################################################################
#
GET_CONFIGURATION --require firewall $CFG_DEBUG
case "$FW_CONFIG_MODE" in
     SuSEfirewall ) 
                     MESSAGE CFGMETHOD firewall SuSEfirewall
                     $alice_bin_dir/make_SuSEfirewall 
                     case $? in
                         0 ) ;;
                         1 ) WARNING CMDFAILED "$alice_bin_dir/make_SuSEfirewall"
                             ;;
                         * ) FATAL CMDFAILED "$alice_bin_dir/make_SuSEfirewall"
                             ;;
                     esac
                     ;;
    no_firewall   )
                     ;;
esac
#
############################################################################
# Thats all
GOOD_BYE 
