forked from extern/shorewall_code
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:
parent
d1f17dbf98
commit
dc6450fc1c
@ -9124,7 +9124,22 @@ compile_firewall() # $1 = File Name
|
|||||||
#
|
#
|
||||||
# Compiled startup file generated by Shorewall $VERSION - $(date)"
|
# 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()
|
stop_firewall()
|
||||||
{
|
{
|
||||||
@ -9142,10 +9157,6 @@ run_iptables()
|
|||||||
$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__
|
__EOF__
|
||||||
f=$(find_file params)
|
f=$(find_file params)
|
||||||
|
|
||||||
|
@ -49,6 +49,8 @@ New Features:
|
|||||||
script from running on a system other than
|
script from running on a system other than
|
||||||
where the 'generate' command is running (see
|
where the 'generate' command is running (see
|
||||||
additional consideration a) below).
|
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
|
<config directory> Is an optional directory to be searched for
|
||||||
configuration files prior to those listed
|
configuration files prior to those listed
|
||||||
in CONFIG_DIR in /etc/shorewall/shorewall.conf.
|
in CONFIG_DIR in /etc/shorewall/shorewall.conf.
|
||||||
@ -78,6 +80,7 @@ New Features:
|
|||||||
limitation.
|
limitation.
|
||||||
|
|
||||||
1) The same version of Shorewall must be running on the remote system
|
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.
|
2) The 'detectnets' interface option is not allowed.
|
||||||
|
|
||||||
b) If you have extension scripts, they may need modification. The scripts
|
b) If you have extension scripts, they may need modification. The scripts
|
||||||
|
Loading…
x
Reference in New Issue
Block a user