summaryrefslogtreecommitdiffstats
path: root/perl-install/network/drakfirewall.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-03-24 12:09:30 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-03-24 12:09:30 +0000
commit204983347708192c367c66f0b96fb7684a4134d8 (patch)
tree7a615ceac11213939c77c3c3595892e2a45bcd55 /perl-install/network/drakfirewall.pm
parent97c7fd33d60103086d91d8c88e08fb902de45e29 (diff)
downloaddrakx-backup-do-not-use-204983347708192c367c66f0b96fb7684a4134d8.tar
drakx-backup-do-not-use-204983347708192c367c66f0b96fb7684a4134d8.tar.gz
drakx-backup-do-not-use-204983347708192c367c66f0b96fb7684a4134d8.tar.bz2
drakx-backup-do-not-use-204983347708192c367c66f0b96fb7684a4134d8.tar.xz
drakx-backup-do-not-use-204983347708192c367c66f0b96fb7684a4134d8.zip
- there is no reason to have string ref for ports
- replace main_auto_install() with default_ports()
Diffstat (limited to 'perl-install/network/drakfirewall.pm')
-rw-r--r--perl-install/network/drakfirewall.pm20
1 files changed, 8 insertions, 12 deletions
diff --git a/perl-install/network/drakfirewall.pm b/perl-install/network/drakfirewall.pm
index fac1e7c10..006889b3e 100644
--- a/perl-install/network/drakfirewall.pm
+++ b/perl-install/network/drakfirewall.pm
@@ -90,8 +90,7 @@ sub check_ports_syntax {
sub to_ports {
my ($servers, $unlisted) = @_;
- my $ports = join(' ', (map { $_->{ports} } @$servers), if_($unlisted, $unlisted));
- \$ports;
+ join(' ', (map { $_->{ports} } @$servers), if_($unlisted, $unlisted));
}
sub from_ports {
@@ -99,7 +98,7 @@ sub from_ports {
my @l;
my @unlisted;
- foreach (split ' ', $$ports) {
+ foreach (split ' ', $ports) {
if (my $s = port2server($_)) {
push @l, $s;
} else {
@@ -120,6 +119,11 @@ sub default_from_pkgs {
} @all_servers ];
}
+sub default_ports {
+ my ($do_pkgs) = @_;
+ to_ports(default_from_pkgs($do_pkgs), '');
+}
+
sub get_ports() {
my $shorewall = network::shorewall::read() or return;
\$shorewall->{ports};
@@ -134,7 +138,7 @@ sub set_ports {
$do_pkgs->ensure_binary_is_installed('shorewall', 'shorewall', $::isInstall) or return;
$shorewall->{disabled} = $disabled;
- $shorewall->{ports} = $$ports;
+ $shorewall->{ports} = $ports;
network::shorewall::write($shorewall);
}
}
@@ -207,11 +211,3 @@ sub main {
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, ''));
-}