summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-10-14 13:08:32 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-10-14 13:08:32 +0000
commit1354d01d74cf83c7260bb8dd4b1c07d484cf2c5d (patch)
tree931a2e67e84721b738ae428ef4a50186dbb5775c /perl-install
parent2aced1a3a3a2a21f67eb89e4b841da13642fa1e8 (diff)
downloaddrakx-1354d01d74cf83c7260bb8dd4b1c07d484cf2c5d.tar
drakx-1354d01d74cf83c7260bb8dd4b1c07d484cf2c5d.tar.gz
drakx-1354d01d74cf83c7260bb8dd4b1c07d484cf2c5d.tar.bz2
drakx-1354d01d74cf83c7260bb8dd4b1c07d484cf2c5d.tar.xz
drakx-1354d01d74cf83c7260bb8dd4b1c07d484cf2c5d.zip
(default_interfaces)
- simplify: ask_from already optimize the one item case for us - make it show up a pull-down menu rather than forcing one to type in the interface - fix it: $conf{net_interface} was *not* set on multiple interfaces case (read) fix it (conf was uselely initialized)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/network/shorewall.pm24
1 files changed, 8 insertions, 16 deletions
diff --git a/perl-install/network/shorewall.pm b/perl-install/network/shorewall.pm
index d6e88eb4e..bd069f063 100644
--- a/perl-install/network/shorewall.pm
+++ b/perl-install/network/shorewall.pm
@@ -66,9 +66,6 @@ sub default_interfaces {
defined $card_netconnect and log::l("[drakgw] Information from netconnect: ignore card $card_netconnect");
my @l = detect_devices::getNet() or return;
- if (@l == 1) {
- $conf{net_interface} = $l[0];
- } else {
$in->ask_from('',
N("Please enter the name of the interface connected to the internet.
@@ -77,26 +74,21 @@ Examples:
eth0, or eth1 for cable connection,
ippp+ for a isdn connection.
", $card_netconnect),
- [ { label => N("Net Device"), val => \$card_netconnect, type => 'entry' } ]);
- put_in_hash($conf ||= {}, {
- net_interface => $card_netconnect,
- });
+ [ { label => N("Net Device"), val => \$card_netconnect, list => \@l } ]);
$conf{net_interface} = $card_netconnect;
#$conf{net_interface} = network::netconnect::get_net_device() || $l[0];
$conf{loc_interface} = [ grep { $_ ne $conf{net_interface} } @l ];
- }
- \%conf;
+ \%conf;
}
sub read {
my ($in, $mode) = @_;
- my %conf = { disabled => !glob_("$::prefix/etc/rc3.d/S*shorewall") };
-
- $conf{ports} =
- join(' ', map {
- my $e = $_;
- map { "$_/$e->[3]" } split(',', $e->[4]);
- } grep { $_->[0] eq 'ACCEPT' && $_->[1] eq 'net' } get_config_file('rules'));
+ my %conf = (disabled => !glob_("$::prefix/etc/rc3.d/S*shorewall"),
+ ports => join(' ', map {
+ my $e = $_;
+ map { "$_/$e->[3]" } split(',', $e->[4]);
+ } grep { $_->[0] eq 'ACCEPT' && $_->[1] eq 'net' } get_config_file('rules'))
+ );
if (my ($e) = get_config_file('masq')) {
$conf{masquerade}{subnet} = $e->[1] if $e->[1];