From 1153ff0c75fb4d2095bf43f4c1e72c9e33bbcbcd Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sat, 27 Mar 2010 07:33:40 -0700 Subject: [PATCH] Avoid a shell warning when brctl is not installed. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 3 ++- Shorewall/Perl/Shorewall/Zones.pm | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 6f243a175..b2d0295a9 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -98,6 +98,7 @@ our %EXPORT_TAGS = ( internal => [ qw( create_temp_script pop_open read_a_line validate_level + which qt ensure_config_path get_configuration @@ -129,7 +130,7 @@ our %EXPORT_TAGS = ( internal => [ qw( create_temp_script Exporter::export_ok_tags('internal'); -our $VERSION = '4.4_8'; +our $VERSION = '4.4_9'; # # describe the current command, it's present progressive, and it's completion. diff --git a/Shorewall/Perl/Shorewall/Zones.pm b/Shorewall/Perl/Shorewall/Zones.pm index a89eed699..c5265bac3 100644 --- a/Shorewall/Perl/Shorewall/Zones.pm +++ b/Shorewall/Perl/Shorewall/Zones.pm @@ -731,7 +731,7 @@ sub firewall_zone() { # Determine if the passed physical device is a bridge # sub is_a_bridge( $ ) { - qt( "brctl show | tail -n+2 | grep -q '^$_[0]\[\[:space:\]\]'" ); + which 'brctl' && qt( "brctl show | tail -n+2 | grep -q '^$_[0]\[\[:space:\]\]'" ); } #