summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/network/drakfirewall.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/network/drakfirewall.pm b/lib/network/drakfirewall.pm
index 819b270..8472b3f 100644
--- a/lib/network/drakfirewall.pm
+++ b/lib/network/drakfirewall.pm
@@ -139,10 +139,13 @@ sub get_ports() {
sub set_ports {
my ($do_pkgs, $disabled, $ports, $log_net_drop, $o_in) = @_;
- my $shorewall = network::shorewall::read(!$disabled && $o_in) or return;
-
if (!$disabled || -x "$::prefix/sbin/shorewall") {
$do_pkgs->ensure_binary_is_installed('shorewall', 'shorewall', $::isInstall) or return;
+ my $shorewall = network::shorewall::read(!$disabled && $o_in);
+ if (!$shorewall) {
+ log::l("unable to read shorewall configuration, skipping installation");
+ return;
+ }
$shorewall->{disabled} = $disabled;
$shorewall->{ports} = $ports;