summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-03-24 10:17:10 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-03-24 10:17:10 +0000
commite089d8aca1b128a8d656fd7d1393f7b67397efae (patch)
tree114ccdbdc63a3a8f63bc8e90d885fa44865f4240 /perl-install
parentfbbcf8129f8c931cea1279ea5589bd657155be4f (diff)
downloaddrakx-backup-do-not-use-e089d8aca1b128a8d656fd7d1393f7b67397efae.tar
drakx-backup-do-not-use-e089d8aca1b128a8d656fd7d1393f7b67397efae.tar.gz
drakx-backup-do-not-use-e089d8aca1b128a8d656fd7d1393f7b67397efae.tar.bz2
drakx-backup-do-not-use-e089d8aca1b128a8d656fd7d1393f7b67397efae.tar.xz
drakx-backup-do-not-use-e089d8aca1b128a8d656fd7d1393f7b67397efae.zip
network::drakfirewall::set_ports() doesn't *need* a $in anymore, and it doesn't die when no network card
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/network/drakfirewall.pm18
1 files changed, 14 insertions, 4 deletions
diff --git a/perl-install/network/drakfirewall.pm b/perl-install/network/drakfirewall.pm
index 554f6298f..fac1e7c10 100644
--- a/perl-install/network/drakfirewall.pm
+++ b/perl-install/network/drakfirewall.pm
@@ -126,10 +126,12 @@ sub get_ports() {
}
sub set_ports {
- my ($in, $disabled, $ports) = @_;
- my $shorewall = network::shorewall::read($in) || network::shorewall::default_interfaces($in) or die N("No network card");
+ my ($do_pkgs, $disabled, $ports, $o_in) = @_;
+
+ my $shorewall = network::shorewall::read($o_in) or return;
+
if (!$disabled || -x "$::prefix/sbin/shorewall") {
- $in->do_pkgs->ensure_binary_is_installed('shorewall', 'shorewall', $::isInstall) or return;
+ $do_pkgs->ensure_binary_is_installed('shorewall', 'shorewall', $::isInstall) or return;
$shorewall->{disabled} = $disabled;
$shorewall->{ports} = $$ports;
@@ -203,5 +205,13 @@ sub main {
($disabled, my $ports) = choose($in, $disabled, $servers, $unlisted) or return;
- set_ports($in, $disabled, $ports);
+ set_ports($in->do_pkgs, $disabled, $ports, $in);
+}
+
+sub main_auto_install {
+ my ($do_pkgs, $disabled) = @_;
+
+ my $possible_servers = default_from_pkgs($do_pkgs);
+
+ set_ports($do_pkgs, $disabled, to_ports($possible_servers, ''));
}