diff --git a/Shorewall/shorewall b/Shorewall/shorewall index 213971b98..e42799c6b 100755 --- a/Shorewall/shorewall +++ b/Shorewall/shorewall @@ -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