diff --git a/Shorewall/firewall b/Shorewall/firewall index ffa0356ad..d5b2f63d5 100755 --- a/Shorewall/firewall +++ b/Shorewall/firewall @@ -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) diff --git a/Shorewall/releasenotes.txt b/Shorewall/releasenotes.txt index b11f564e3..b880977da 100755 --- a/Shorewall/releasenotes.txt +++ b/Shorewall/releasenotes.txt @@ -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. 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