From 1957af04fdc82cc95822ea2fee1d3ff7d63a1d93 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Tue, 20 Nov 2012 16:10:30 -0800 Subject: [PATCH] Don't create a _weight file for an optional non-provider interface. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Providers.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Providers.pm b/Shorewall/Perl/Shorewall/Providers.pm index 1e95ea5f1..e5f0e3eda 100644 --- a/Shorewall/Perl/Shorewall/Providers.pm +++ b/Shorewall/Perl/Shorewall/Providers.pm @@ -858,9 +858,12 @@ CEOF pop_indent; - emit( 'else' ); - emit( qq( echo $weight > \${VARDIR}/${physical}_weight) ); - emit_started_message( ' ', '', $pseudo, $table, $number ); + unless ( $pseudo ) { + emit( 'else' ); + emit( qq( echo $weight > \${VARDIR}/${physical}_weight) ); + emit_started_message( ' ', '', $pseudo, $table, $number ); + } + emit "fi\n"; } else { emit( qq(echo 0 > \${VARDIR}/${physical}.status) );