mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-19 17:28:35 +02:00
Fix STARTUP_ENABLED
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3439 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
844081b587
commit
42220775a0
@ -243,7 +243,16 @@ get_config() {
|
|||||||
case $STARTUP_ENABLED in
|
case $STARTUP_ENABLED in
|
||||||
[Nn][Oo])
|
[Nn][Oo])
|
||||||
echo " WARNING: Shorewall startup is disabled. To enable startup, set STARTUP_ENABLED=Yes in /etc/shorewall/shorewall.conf" >&2
|
echo " WARNING: Shorewall startup is disabled. To enable startup, set STARTUP_ENABLED=Yes in /etc/shorewall/shorewall.conf" >&2
|
||||||
|
STARTUP_ENABLED=
|
||||||
;;
|
;;
|
||||||
|
[Yy][Ee][Ss])
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if [ -n "$STARTUP_ENABLED" ]; then
|
||||||
|
echo " ERROR: Invalid Value for STARTUP_ENABLE: $STARTUP_ENABLED" >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
;;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case ${TC_ENABLED:=Internal} in
|
case ${TC_ENABLED:=Internal} in
|
||||||
@ -514,6 +523,11 @@ start_command() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$STARTUP_ENABLED" ]; then
|
||||||
|
error_message "ERROR: Startup is disabled"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
while [ $finished -eq 0 -a $# -gt 0 ]; do
|
while [ $finished -eq 0 -a $# -gt 0 ]; do
|
||||||
option=$1
|
option=$1
|
||||||
case $option in
|
case $option in
|
||||||
@ -803,6 +817,11 @@ restart_command() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if [ -z "$STARTUP_ENABLED" ]; then
|
||||||
|
error_message "ERROR: Startup is disabled"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
export NOROUTES
|
export NOROUTES
|
||||||
|
|
||||||
[ -n "$nolock" ] || mutex_on
|
[ -n "$nolock" ] || mutex_on
|
||||||
@ -1114,6 +1133,11 @@ safe_commands() {
|
|||||||
|
|
||||||
[ $# -eq 0 ] || usage 2
|
[ $# -eq 0 ] || usage 2
|
||||||
|
|
||||||
|
if [ -z "$STARTUP_ENABLED" ]; then
|
||||||
|
error_message "ERROR: Startup is disabled"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
mutex_on
|
mutex_on
|
||||||
|
|
||||||
if shorewall_is_started; then
|
if shorewall_is_started; then
|
||||||
@ -1228,6 +1252,11 @@ restore_command() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if [ -z "$STARTUP_ENABLED" ]; then
|
||||||
|
error_message "ERROR: Startup is disabled"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
RESTOREPATH=/var/lib/shorewall/$RESTOREFILE
|
RESTOREPATH=/var/lib/shorewall/$RESTOREFILE
|
||||||
|
|
||||||
export NOROUTES
|
export NOROUTES
|
||||||
|
Loading…
x
Reference in New Issue
Block a user