Fix initialization

This commit is contained in:
Tom Eastep 2009-10-15 13:06:04 -07:00
parent 6e6063f193
commit 44c5ebcfa4
2 changed files with 24 additions and 7 deletions

View File

@ -230,14 +230,24 @@ sub generate_script_2() {
'[ -d ${VARDIR} ] || mkdir -p ${VARDIR}'
);
pop_indent;
emit "\n}\n"; # End of initialize()
emit( '' ,
'#' ,
'# Set global variables holding detected IP information' ,
'#' ,
'detect_configuration()',
'{' );
my $global_variables = have_global_variables;
if ( $global_variables ) {
emit( '' ,
'#' ,
'# Set global variables holding detected IP information' ,
'#' ,
'case $COMMAND in' );
push_indent;
emit( 'case $COMMAND in' );
push_indent;
@ -273,12 +283,14 @@ sub generate_script_2() {
pop_indent;
emit ( 'esac' ) ,
} else {
emit( 'true' );
}
pop_indent;
emit "\n}\n"; # End of initialize()
emit "\n}\n"; # End of detect_configuration()
}
#

View File

@ -362,6 +362,7 @@ case "$COMMAND" in
status=0
else
progress_message3 "Starting $PRODUCT...."
detect_configuration
define_firewall
status=$?
[ -n "$SUBSYSLOCK" -a $status -eq 0 ] && touch $SUBSYSLOCK
@ -371,6 +372,7 @@ case "$COMMAND" in
stop)
[ $# -ne 1 ] && usage 2
progress_message3 "Stopping $PRODUCT...."
detect_configuration
stop_firewall
status=0
[ -n "$SUBSYSLOCK" ] && rm -f $SUBSYSLOCK
@ -414,6 +416,7 @@ case "$COMMAND" in
progress_message3 "Starting $PRODUCT...."
fi
detect_configuration
define_firewall
status=$?
if [ -n "$SUBSYSLOCK" ]; then
@ -425,6 +428,7 @@ case "$COMMAND" in
[ $# -ne 1 ] && usage 2
if shorewall_is_started; then
progress_message3 "Refreshing $PRODUCT...."
detect_configuration
define_firewall
status=$?
progress_message3 "done."
@ -435,6 +439,7 @@ case "$COMMAND" in
;;
restore)
[ $# -ne 1 ] && usage 2
detect_configuration
define_firewall
status=$?
if [ -n "$SUBSYSLOCK" ]; then