summaryrefslogtreecommitdiffstats
path: root/lib/network/drakfirewall.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-27 18:39:39 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-27 18:39:39 +0000
commitfaacae2c774ab31d7e1b3362bf1f57df29555fcb (patch)
tree8fe206c06034fdf11dc9e9372b62525d9af13add /lib/network/drakfirewall.pm
parent47c451b02f5c32d34966af13112aadf2b1ac24b1 (diff)
downloaddrakx-net-faacae2c774ab31d7e1b3362bf1f57df29555fcb.tar
drakx-net-faacae2c774ab31d7e1b3362bf1f57df29555fcb.tar.gz
drakx-net-faacae2c774ab31d7e1b3362bf1f57df29555fcb.tar.bz2
drakx-net-faacae2c774ab31d7e1b3362bf1f57df29555fcb.tar.xz
drakx-net-faacae2c774ab31d7e1b3362bf1f57df29555fcb.zip
really configure shorewall if not installed previously
Diffstat (limited to 'lib/network/drakfirewall.pm')
-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;