mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-23 22:58:52 +01: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
|
||||
[Nn][Oo])
|
||||
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
|
||||
|
||||
case ${TC_ENABLED:=Internal} in
|
||||
@ -514,6 +523,11 @@ start_command() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$STARTUP_ENABLED" ]; then
|
||||
error_message "ERROR: Startup is disabled"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
while [ $finished -eq 0 -a $# -gt 0 ]; do
|
||||
option=$1
|
||||
case $option in
|
||||
@ -803,6 +817,11 @@ restart_command() {
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$STARTUP_ENABLED" ]; then
|
||||
error_message "ERROR: Startup is disabled"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
export NOROUTES
|
||||
|
||||
[ -n "$nolock" ] || mutex_on
|
||||
@ -1114,6 +1133,11 @@ safe_commands() {
|
||||
|
||||
[ $# -eq 0 ] || usage 2
|
||||
|
||||
if [ -z "$STARTUP_ENABLED" ]; then
|
||||
error_message "ERROR: Startup is disabled"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
mutex_on
|
||||
|
||||
if shorewall_is_started; then
|
||||
@ -1228,6 +1252,11 @@ restore_command() {
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$STARTUP_ENABLED" ]; then
|
||||
error_message "ERROR: Startup is disabled"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
RESTOREPATH=/var/lib/shorewall/$RESTOREFILE
|
||||
|
||||
export NOROUTES
|
||||
|
Loading…
Reference in New Issue
Block a user