diff options
author | Florin Grad <florin@mandriva.com> | 2003-09-24 13:14:57 +0000 |
---|---|---|
committer | Florin Grad <florin@mandriva.com> | 2003-09-24 13:14:57 +0000 |
commit | 37d7bb620ac71f550cdbdc7276235ef1eaa10834 (patch) | |
tree | 1b63a12c8ad4193b5d88ade8928c0d5f2a11ca16 /perl-install/network/drakfirewall.pm | |
parent | 64b8c4867e4bae1c43af9a8dfaee73f3c68887df (diff) | |
download | drakx-backup-do-not-use-37d7bb620ac71f550cdbdc7276235ef1eaa10834.tar drakx-backup-do-not-use-37d7bb620ac71f550cdbdc7276235ef1eaa10834.tar.gz drakx-backup-do-not-use-37d7bb620ac71f550cdbdc7276235ef1eaa10834.tar.bz2 drakx-backup-do-not-use-37d7bb620ac71f550cdbdc7276235ef1eaa10834.tar.xz drakx-backup-do-not-use-37d7bb620ac71f550cdbdc7276235ef1eaa10834.zip |
allow drakfirewall to choose the interface
Diffstat (limited to 'perl-install/network/drakfirewall.pm')
-rw-r--r-- | perl-install/network/drakfirewall.pm | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/perl-install/network/drakfirewall.pm b/perl-install/network/drakfirewall.pm index dc2dcc668..c5b8c6288 100644 --- a/perl-install/network/drakfirewall.pm +++ b/perl-install/network/drakfirewall.pm @@ -1,7 +1,7 @@ package network::drakfirewall; # $Id$ -use diagnostics; -use strict; + + use network::shorewall; use common; @@ -105,16 +105,14 @@ sub default_from_pkgs { } sub get_ports { - my ($_ports) = @_; - my $shorewall = network::shorewall::read() or return; + my ($in, $_ports) = @_; + my $shorewall = network::shorewall::read($in,'silent') or return; \$shorewall->{ports}; } sub set_ports { my ($in, $disabled, $ports) = @_; - - my $shorewall = network::shorewall::read() || network::shorewall::default_interfaces() or die \N("No network card"); - + my $shorewall = network::shorewall::read($in,'not_silent') || network::shorewall::default_interfaces($in) or die \N("No network card"); if (!$disabled || -x "$::prefix/sbin/shorewall") { $in->do_pkgs->ensure_is_installed('shorewall', '/sbin/shorewall', $::isInstall) or return; @@ -126,13 +124,13 @@ sub set_ports { sub get_conf { my ($in, $disabled, $o_ports) = @_; - + my $possible_servers = default_from_pkgs($in); $_->{hide} = 0 foreach @$possible_servers; if ($o_ports) { $disabled, from_ports($o_ports); - } elsif (my $shorewall = network::shorewall::read()) { + } elsif (my $shorewall = network::shorewall::read($in,'silent')) { $shorewall->{disabled}, from_ports(\$shorewall->{ports}); } else { $in->ask_okcancel('', N("drakfirewall configurator |