Be consistent about where messaes are generated

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6842 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-07-10 23:09:33 +00:00
parent d94868d353
commit 38892108c9
6 changed files with 25 additions and 8 deletions

View File

@ -354,6 +354,8 @@ sub process_action1 ( $$ ) {
sub process_actions1() {
progress_message2 "Preprocessing Action Files...";
for my $act ( grep $targets{$_} & ACTION , keys %targets ) {
new_action $act;
}

View File

@ -81,6 +81,8 @@ sub reinitialize() {
# Generate the various user-exit jacket functions.
# Generate the 'initialize()' function.
#
# Note: This function is not called when $command eq 'check'. So it must have no side effects other
# than those related to writing to the object file.
sub generate_script_1() {
@ -489,6 +491,9 @@ EOF
# distribution's tools have configured IP without any Shorewall
# modifications.
#
# Note: This function is not called when $command eq 'check'. So it must have no side effects other
# than those related to writing to the object file.
#
sub generate_script_2 () {
copy $globals{SHAREDIRPL} . 'prog.functions';
@ -584,6 +589,9 @@ sub generate_script_2 () {
# Generate the 'setup_netfilter()' function that runs iptables-restore.
# Generate the 'define_firewall()' function.
#
# Note: This function is not called when $command eq 'check'. So it must have no side effects other
# than those related to writing to the object file.
#
sub generate_script_3() {
emit 'cat > ${VARDIR}/proxyarp << __EOF__';
@ -715,7 +723,7 @@ sub compiler( $$$$ ) {
initialize_chain_table;
if ( $command eq 'compile' ) {
unless ( $command eq 'check' ) {
create_temp_object( $objectfile );
generate_script_1;
}
@ -735,12 +743,10 @@ sub compiler( $$$$ ) {
#
# Report zone contents
#
progress_message2 "Determining Hosts in Zones...";
zone_report;
#
# Do action pre-processing.
#
progress_message2 "Preprocessing Action Files...";
process_actions1;
#
# Process the Policy File.
@ -793,7 +799,6 @@ sub compiler( $$$$ ) {
#
# MACLIST Filtration
#
progress_message2 "$doing MAC Filtration -- Phase 1...";
setup_mac_lists 1;
#
# Process the rules file.
@ -811,12 +816,10 @@ sub compiler( $$$$ ) {
#
# MACLIST Filtration again
#
progress_message2 "$doing MAC Filtration -- Phase 2...";
setup_mac_lists 2;
#
# Apply Policies
#
progress_message2 'Applying Policies...';
apply_policy_rules;
#
# TCRules and Traffic Shaping
@ -834,8 +837,10 @@ sub compiler( $$$$ ) {
# Accounting.
#
setup_accounting;
progress_message2 'Generating Rule Matrix...';
#
# We generate the matrix even though we don't write out the rules. That way, we insure that
# a compile of the script won't blow up during that step.
#
generate_matrix;
if ( $command eq 'check' ) {

View File

@ -301,6 +301,8 @@ sub default_policy( $$$ ) {
}
sub apply_policy_rules() {
progress_message2 'Applying Policies...';
for my $chainref ( @policy_chains ) {
my $policy = $chainref->{policy};
my $loglevel = $chainref->{loglevel};

View File

@ -694,6 +694,8 @@ sub setup_mac_lists( $ ) {
my $disposition = $config{MACLIST_DISPOSITION};
my $ttl = $config{MACLIST_TTL};
progress_message2 "$doing MAC Filtration -- Phase $phase...";
for my $hostref ( @$maclist_hosts ) {
$maclist_interfaces{ $hostref->[0] } = 1;
}
@ -1415,6 +1417,7 @@ sub generate_matrix() {
# Set a breakpoint in this function if you want to step through generate_matrix().
#
sub start_matrix() {
progress_message2 'Generating Rule Matrix...';
}
#

View File

@ -328,6 +328,8 @@ sub validate_tc_device( $$$ ) {
$tcdevices{$device}{out_bandwidth} = $outband;
push @tcdevices, $device;
progress_message " Tcdevice \"$currentline\" $done.";
}
sub convert_rate( $$ ) {
@ -395,6 +397,7 @@ sub validate_tc_class( $$$$$$ ) {
}
push @tcclasses, "$device:$markval";
progress_message " Tcclass \"$currentline\" $done.";
}
sub setup_traffic_shaping() {

View File

@ -304,6 +304,8 @@ sub haveipseczones() {
#
sub zone_report()
{
progress_message2 "Determining Hosts in Zones...";
for my $zone ( @zones )
{
my $zoneref = $zones{$zone};