Fix a couple of warts with compile -e

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4056 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-06-10 15:18:42 +00:00
parent 159018a129
commit 57bbe4a53d
2 changed files with 20 additions and 5 deletions

View File

@ -8228,18 +8228,33 @@ initialize() {
__EOF__
INDENT=" "
cat >&3 << __EOF__
if [ -n "$EXPORT" ]; then
cat >&3 << __EOF__
if [ ! -f \${SHAREDIR}/version ]; then
fatal_error "This script requires Shorewall or Shorewall Lite which do not appear to be installed on this system"
fatal_error "This script requires Shorewall Lite which do not appear to be installed on this system"
fi
local version=\$(cat \${SHAREDIR}/version)
if [ \${LIBVERSION:-0} -lt 30191 ]; then
fatal_error "This script requires Shorewall [Lite] version 3.2.0-Beta7 or later; current version is \$version"
fatal_error "This script requires Shorewall Lite version 3.2.0-RC2 or later; current version is \$version"
fi
__EOF__
else
cat >&3 << __EOF__
if [ ! -f \${SHAREDIR}/version ]; then
fatal_error "This script requires Shorewall which do not appear to be installed on this system (did you forget "-e" when you compiled?)"
fi
local version=\$(cat \${SHAREDIR}/version)
if [ \${LIBVERSION:-0} -lt 30191 ]; then
fatal_error "This script requires Shorewall version 3.2.0-Beta7 or later; current version is \$version"
fi
__EOF__
fi
cat >&3 << __EOF__
#

View File

@ -109,8 +109,8 @@ case "$COMMAND" in
status=4
fi
if [ -f /var/lib/shorewall/state ]; then
state="$(cat /var/lib/shorewall/state)"
if [ -f ${VARDIR}/state ]; then
state="$(cat ${VARDIR}/state)"
case $state in
Stopped*|Clear*)
status=3