summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-02-14 12:58:01 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-02-14 12:58:01 +0000
commit9634d884835a471353402b8870116349c206be21 (patch)
tree4e463d8c0fadffae5f7784d50ba93ccc92691748
parentd0f17f7a2524e3e1c19414ba1cff55310baa960c (diff)
downloaddrakx-backup-do-not-use-9634d884835a471353402b8870116349c206be21.tar
drakx-backup-do-not-use-9634d884835a471353402b8870116349c206be21.tar.gz
drakx-backup-do-not-use-9634d884835a471353402b8870116349c206be21.tar.bz2
drakx-backup-do-not-use-9634d884835a471353402b8870116349c206be21.tar.xz
drakx-backup-do-not-use-9634d884835a471353402b8870116349c206be21.zip
install package shorewall only when the user wants a firewall
-rw-r--r--perl-install/network/drakfirewall.pm16
1 files changed, 9 insertions, 7 deletions
diff --git a/perl-install/network/drakfirewall.pm b/perl-install/network/drakfirewall.pm
index ad2c6205e..34e263641 100644
--- a/perl-install/network/drakfirewall.pm
+++ b/perl-install/network/drakfirewall.pm
@@ -105,13 +105,17 @@ sub get_ports {
}
sub set_ports {
- my ($disabled, $ports) = @_;
+ my ($in, $disabled, $ports) = @_;
my $shorewall = network::shorewall::read() || network::shorewall::default_interfaces() or die N("No network card");
- $shorewall->{disabled} = $disabled;
- $shorewall->{ports} = $$ports;
- network::shorewall::write($shorewall);
+ if (!$disabled || -x "$::prefix/sbin/shorewall") {
+ $in->do_pkgs->ensure_is_installed('shorewall', '/sbin/shorewall', $::isInstall) or return;
+
+ $shorewall->{disabled} = $disabled;
+ $shorewall->{ports} = $$ports;
+ network::shorewall::write($shorewall);
+ }
}
sub get_conf {
@@ -176,9 +180,7 @@ sub main {
($disabled, my $servers, my $unlisted) = get_conf($in, $disabled) or return;
- $in->do_pkgs->ensure_is_installed('shorewall', '/sbin/shorewall', $::isInstall) or return;
-
($disabled, my $ports) = choose($in, $disabled, $servers, $unlisted) or return;
- set_ports($disabled, $ports);
+ set_ports($in, $disabled, $ports);
}