mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 09:47:51 +02:00
Correct 'start -f' with AUTOMAKE=Yes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
e236be37db
commit
d883e45f83
@ -330,7 +330,7 @@ startup_error() {
|
|||||||
# Determine if there are config files newer than the passed object
|
# Determine if there are config files newer than the passed object
|
||||||
#
|
#
|
||||||
uptodate() {
|
uptodate() {
|
||||||
[ -f $1 ] || return 1
|
[ -x $1 ] || return 1
|
||||||
|
|
||||||
local dir
|
local dir
|
||||||
local ifs
|
local ifs
|
||||||
@ -425,11 +425,10 @@ start_command() {
|
|||||||
local finished
|
local finished
|
||||||
finished=0
|
finished=0
|
||||||
local object
|
local object
|
||||||
|
local rc
|
||||||
|
rc=0
|
||||||
|
|
||||||
do_it() {
|
do_it() {
|
||||||
local rc
|
|
||||||
rc=0
|
|
||||||
|
|
||||||
if [ -n "$AUTOMAKE" ]; then
|
if [ -n "$AUTOMAKE" ]; then
|
||||||
[ -n "$nolock" ] || mutex_on
|
[ -n "$nolock" ] || mutex_on
|
||||||
run_it ${VARDIR}/firewall $g_debugging start
|
run_it ${VARDIR}/firewall $g_debugging start
|
||||||
@ -541,17 +540,15 @@ start_command() {
|
|||||||
AUTOMAKE=
|
AUTOMAKE=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$g_fast" ]; then
|
if [ -n "$g_fast" -a $object = $RESTOREFILE ]; then
|
||||||
g_restorepath=${VARDIR}/$RESTOREFILE
|
g_restorepath=${VARDIR}/$object
|
||||||
|
[ -n "$nolock" ] || mutex_on
|
||||||
if [ -x $g_restorepath ]; then
|
echo Restoring Shorewall...
|
||||||
echo Restoring Shorewall...
|
run_it $g_restorepath restore
|
||||||
run_it $g_restorepath restore
|
rc=$?
|
||||||
date > ${VARDIR}/restarted
|
[ -n "$nolock" ] || mutex_off
|
||||||
progress_message3 Shorewall restored from $g_restorepath
|
[ $rc -eq 0 ] && progress_message3 "Shorewall restored from $g_restorepath"
|
||||||
else
|
exit $rc
|
||||||
do_it
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
do_it
|
do_it
|
||||||
fi
|
fi
|
||||||
|
@ -330,7 +330,7 @@ startup_error() {
|
|||||||
# Determine if there are config files newer than the passed object
|
# Determine if there are config files newer than the passed object
|
||||||
#
|
#
|
||||||
uptodate() {
|
uptodate() {
|
||||||
[ -f $1 ] || return 1
|
[ -x $1 ] || return 1
|
||||||
|
|
||||||
local dir
|
local dir
|
||||||
local ifs
|
local ifs
|
||||||
@ -426,11 +426,10 @@ start_command() {
|
|||||||
local finished
|
local finished
|
||||||
finished=0
|
finished=0
|
||||||
local object
|
local object
|
||||||
|
local rc
|
||||||
|
rc=0
|
||||||
|
|
||||||
do_it() {
|
do_it() {
|
||||||
local rc
|
|
||||||
rc=0
|
|
||||||
|
|
||||||
if [ -n "$AUTOMAKE" ]; then
|
if [ -n "$AUTOMAKE" ]; then
|
||||||
[ -n "$nolock" ] || mutex_on
|
[ -n "$nolock" ] || mutex_on
|
||||||
run_it ${VARDIR}/firewall $g_debugging start
|
run_it ${VARDIR}/firewall $g_debugging start
|
||||||
@ -542,17 +541,15 @@ start_command() {
|
|||||||
AUTOMAKE=
|
AUTOMAKE=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$g_fast" ]; then
|
if [ -n "$g_fast" -a $object = $RESTOREFILE ]; then
|
||||||
g_restorepath=${VARDIR}/$RESTOREFILE
|
g_restorepath=${VARDIR}/$object
|
||||||
|
[ -n "$nolock" ] || mutex_on
|
||||||
if [ -x $g_restorepath ]; then
|
echo Restoring Shorewall...
|
||||||
echo Restoring Shorewall6...
|
run_it $g_restorepath restore
|
||||||
run_it $g_restorepath restore
|
rc=$?
|
||||||
date > ${VARDIR}/restarted
|
[ -n "$nolock" ] || mutex_off
|
||||||
progress_message3 Shorewall6 restored from $g_restorepath
|
[ $rc -eq 0 ] && progress_message3 "Shorewall6 restored from $g_restorepath"
|
||||||
else
|
exit $rc
|
||||||
do_it
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
do_it
|
do_it
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user