Allow remote execution of scripts generated by 'compile' on non-Shorewall systems

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3281 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-01-14 01:35:25 +00:00
parent d1f17dbf98
commit dc6450fc1c
2 changed files with 19 additions and 5 deletions

View File

@ -9124,7 +9124,22 @@ compile_firewall() # $1 = File Name
#
# Compiled startup file generated by Shorewall $VERSION - $(date)"
#
. /usr/share/shorewall/functions
__EOF__
if [ -n "$EXPORT" ]; then
cat /usr/share/shorewall/functions >> $RESTOREBASE
else
cat >> $RESTOREBASE << __EOF__
if [ ! -f /usr/share/shorewall/version ] || [ \$(cat /usr/share/shorewall/version) != $VERSION ]; then
fatal_error "This script requires Shorewall version $VERSION"
fi
__EOF__
fi
cat >> $RESTOREBASE << __EOF__
stop_firewall()
{
@ -9142,10 +9157,6 @@ run_iptables()
$IPTABLES \$@
}
if [ ! -f /usr/share/shorewall/version ] || [ \$(cat /usr/share/shorewall/version) != $VERSION ]; then
fatal_error "This script requires Shorewall version $VERSION"
fi
__EOF__
f=$(find_file params)

View File

@ -49,6 +49,8 @@ New Features:
script from running on a system other than
where the 'generate' command is running (see
additional consideration a) below).
Also allows the generated script to run
on a system without Shorewall installed.
<config directory> Is an optional directory to be searched for
configuration files prior to those listed
in CONFIG_DIR in /etc/shorewall/shorewall.conf.
@ -78,6 +80,7 @@ New Features:
limitation.
1) The same version of Shorewall must be running on the remote system
unless you use the "-e" option.
2) The 'detectnets' interface option is not allowed.
b) If you have extension scripts, they may need modification. The scripts