Allow shell variable expansion in /etc/shorewall/routestopped

Make the HOST(S) column optional in /etc/shorewall/routestopped
Add a 'stopped' user exit


git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@132 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2002-07-11 16:15:40 +00:00
parent 45e4750219
commit ccdbd9faed
2 changed files with 11 additions and 3 deletions

View File

@ -1018,6 +1018,8 @@ stop_firewall() {
strip_file routestopped
while read interface host; do
expandv interface host
[ "x$host" = "x-" ] && host=
hosts="$hosts $interface:${host:-0.0.0.0/0}"
done < $TMP_DIR/routestopped
@ -1052,6 +1054,8 @@ stop_firewall() {
;;
esac
run_user_exit stopped
logger "Shorewall Stopped"
rm -rf $TMP_DIR

View File

@ -4,12 +4,16 @@
#
# /etc/shorewall/routestopped
#
# This file is used to define the hosts that are accessible when the firewall is stopped
# This file is used to define the hosts that are accessible when the
# firewall is stopped
#
# Columns must be separated by white space and are:
#
# INTERFACE - Interface through which host(s) communicate with the firewall
# HOST(S) - Comma-separated list of IP/subnet addresses.
# INTERFACE - Interface through which host(s) communicate with
# the firewall
# HOST(S) - (Optional) Comma-separated list of IP/subnet
# addresses. If left empty or supplied as "-",
# 0.0.0.0/0 is assumed.
#
# Example:
#