Correct 'disable' with dynamic gateway

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2011-09-02 11:01:06 -07:00
parent 46d9faa63a
commit d1fea7c682
2 changed files with 4 additions and 3 deletions

View File

@ -265,9 +265,9 @@ sub generate_script_2() {
push_indent; push_indent;
if ( $global_variables & NOT_RESTORE ) { if ( $global_variables & NOT_RESTORE ) {
emit( 'start|restart|refresh|enable)' ); emit( 'start|restart|refresh|disable|enable)' );
} else { } else {
emit( 'start|restart|refresh|enable|restore)' ); emit( 'start|restart|refresh|disable|enable|restore)' );
} }
push_indent; push_indent;

View File

@ -310,11 +310,11 @@ case "$COMMAND" in
status=0; status=0;
;; ;;
enable) enable)
detect_configuration
[ $# -eq 1 ] && exit 0 [ $# -eq 1 ] && exit 0
shift shift
[ $# -ne 1 ] && usage 2 [ $# -ne 1 ] && usage 2
if shorewall_is_started; then if shorewall_is_started; then
detect_configuration
enable_provider $1 enable_provider $1
fi fi
status=0 status=0
@ -324,6 +324,7 @@ case "$COMMAND" in
shift shift
[ $# -ne 1 ] && usage 2 [ $# -ne 1 ] && usage 2
if shorewall_is_started; then if shorewall_is_started; then
detect_configuration
disable_provider $1 disable_provider $1
fi fi
status=0 status=0