mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-23 19:21:21 +02:00
Fix GATEWAY (again) and add version checking between compiled programs and library
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3427 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
900fd6c8a2
commit
12e21f8db9
@ -1173,6 +1173,8 @@ ${INDENT} fatal_error "Unable to detect the gateway through interface $in
|
|||||||
${INDENT} fi
|
${INDENT} fi
|
||||||
|
|
||||||
__EOF__
|
__EOF__
|
||||||
|
else
|
||||||
|
save_command "gateway=$gateway"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ x${mark} != x- ]; then
|
if [ x${mark} != x- ]; then
|
||||||
@ -8439,8 +8441,14 @@ initialize() {
|
|||||||
__EOF__
|
__EOF__
|
||||||
if [ -z "$EXPORT" ]; then
|
if [ -z "$EXPORT" ]; then
|
||||||
cat >&3 << __EOF__
|
cat >&3 << __EOF__
|
||||||
if [ ! -f /usr/share/shorewall/version ] || [ \$(cat /usr/share/shorewall/version) != $VERSION ]; then
|
if [ ! -f /usr/share/shorewall/version ]; then
|
||||||
startup_error "This script requires Shorewall version $VERSION"
|
fatal_error "This script requires Shorewall which does not appear to be installed on this system"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local version=\$(cat /usr/share/shorewall/version)
|
||||||
|
|
||||||
|
if [ \${LIBVERSION:-0} -lt 30105 ]; then
|
||||||
|
fatal_error "This script requires Shorewall version 3.1.5 or later; current version is \$version"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
__EOF__
|
__EOF__
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
#
|
#
|
||||||
# Shorewall 3.2 -- /usr/share/shorewall/functions
|
# Shorewall 3.2 -- /usr/share/shorewall/functions
|
||||||
|
|
||||||
|
LIBVERSION=30105
|
||||||
|
|
||||||
#
|
#
|
||||||
# Message to stderr
|
# Message to stderr
|
||||||
#
|
#
|
||||||
|
@ -40,6 +40,17 @@ Other changes in 3.1.5
|
|||||||
'generate' and 'reload' command have been removed. The 'reload' command
|
'generate' and 'reload' command have been removed. The 'reload' command
|
||||||
has also been removed from the program generated by 'compile'.
|
has also been removed from the program generated by 'compile'.
|
||||||
|
|
||||||
|
2) Scripts compiled without the -e option are now more forgiving when run
|
||||||
|
on systems with a different Shorewall version installed. If the
|
||||||
|
installed version meets minimum version requirements, the script will
|
||||||
|
run -- it no longer requires an exact match.
|
||||||
|
|
||||||
|
That having been said, the minimum version required for scripts
|
||||||
|
compiled with 3.1.5 is 3.1.5. I plan to add new features to the library
|
||||||
|
(/usr/share/shorewall/functions) in advance of using them in compiled
|
||||||
|
scripts so that scripts compiled on one version of Shorewall should be
|
||||||
|
able to run on the next several newer minor releases.
|
||||||
|
|
||||||
Migration Considerations:
|
Migration Considerations:
|
||||||
|
|
||||||
1) A number of macros have been split into two. The macros affected are:
|
1) A number of macros have been split into two. The macros affected are:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user