| verzia 2.79, 2011/07/20 19:05:12 |
verzia 2.80, 2011/10/03 17:33:52 |
|
|
| # Licensed under terms of GNU General Public License. |
# Licensed under terms of GNU General Public License. |
| # All rights reserved. |
# All rights reserved. |
| # |
# |
| # $Platon: scripts/shell/firewall/fw-universal.sh,v 2.78 2011-07-14 13:13:22 nepto Exp $ |
# $Platon: scripts/shell/firewall/fw-universal.sh,v 2.79 2011-07-20 19:05:12 nepto Exp $ |
| # |
# |
| # Changelog: |
# Changelog: |
| # 2003-10-24 - created |
# 2003-10-24 - created |
|
|
| |
|
| if [ ! -d "$DEFAULT_CACHE_DIR" ]; then |
if [ ! -d "$DEFAULT_CACHE_DIR" ]; then |
| mkdir -p "$DEFAULT_CACHE_DIR"; |
mkdir -p "$DEFAULT_CACHE_DIR"; |
| |
if [ "$?" -ne "0" ]; then |
| |
print_info "ERROR: unable to create cache dir in load_cache()"; |
| |
return; |
| |
fi |
| fi |
fi |
| |
|
| config=`cat $DEFAULT_FIREWALL_CONFIG $0 $DEFAULT_FIREWALL_CONFIG_DIR/deploy-servers.list $DEFAULT_FIREWALL_CONFIG_DIR/BANNED_IP.conf `; # config file and firewalling script |
config=""; |
| md5key=`echo "config = '$config' parsed_interfaces ='$parsed_interfaces' parsed_routes='$parsed_routes'" | md5sum | $AWK '{ print $1; }'`; |
if [ -r "$DEFAULT_FIREWALL_CONFIG" ]; then |
| |
config="$config ` cat \"$DEFAULT_FIREWALL_CONFIG\" `"; |
| |
fi |
| |
if [ -r "$0" ]; then |
| |
config="$config ` cat \"$0\" `"; |
| |
fi |
| |
if [ -r "$DEFAULT_FIREWALL_CONFIG_DIR/deploy-servers.list" ]; then |
| |
config="$config ` cat \"$DEFAULT_FIREWALL_CONFIG_DIR/deploy-servers.list\" `"; |
| |
fi |
| |
if [ -r "$DEFAULT_FIREWALL_CONFIG_DIR/BANNED_IP.conf" ]; then |
| |
config="$config ` cat \"$DEFAULT_FIREWALL_CONFIG_DIR/BANNED_IP.conf\" `"; |
| |
fi |
| |
md5key=`echo config='$config' parsed_interfaces='$parsed_interfaces' parsed_routes='$parsed_routes'\" | md5sum | $AWK '{print $1;}'`; |
| CACHE_FILE="$DEFAULT_CACHE_DIR/$md5key" |
CACHE_FILE="$DEFAULT_CACHE_DIR/$md5key" |
| |
|
| #echo "CACHE_FILE=$CACHE_FILE" |
#echo "CACHE_FILE=$CACHE_FILE" |