diff options
author | Mystery Man <unknown@mandriva.org> | 2005-10-20 14:05:54 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2005-10-20 14:05:54 +0000 |
commit | 9b6a0d83d135fad376b4eadcb2bd7bd8c8a07aa5 (patch) | |
tree | f3ef7ada2ce82dafb6d41cc087b0cc7fdfc40a46 /perl-install/network/netconnect.pm | |
parent | 3e4ad5e1b687f262a1d7cc39a0b905a595ac7f95 (diff) | |
download | drakx-backup-do-not-use-10_34_11_100mdk.tar drakx-backup-do-not-use-10_34_11_100mdk.tar.gz drakx-backup-do-not-use-10_34_11_100mdk.tar.bz2 drakx-backup-do-not-use-10_34_11_100mdk.tar.xz drakx-backup-do-not-use-10_34_11_100mdk.zip |
This commit was manufactured by cvs2svn to create tagV10_34_11_100mdk
'V10_34_11_100mdk'.
Diffstat (limited to 'perl-install/network/netconnect.pm')
-rw-r--r-- | perl-install/network/netconnect.pm | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index d4ff1ab1d..d52523ad8 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -86,7 +86,7 @@ sub real_main { my ($ntf_name, $ipadr, $netadr, $gateway_ex, $up, $need_restart_network); my ($isdn, $isdn_name, $isdn_type, %isdn_cards); my $my_isdn = join('', N("Manual choice"), " (", N("Internal ISDN card"), ")"); - my ($module, $auto_ip, $onboot, $needhostname, $hotplug, $track_network_id, @fields); # lan config + my ($module, $auto_ip, $protocol, $onboot, $needhostname, $hotplug, $track_network_id, @fields); # lan config my $success = 1; my $ethntf = {}; my $db_path = "$::prefix/usr/share/apps/kppp/Provider"; @@ -130,8 +130,8 @@ sub real_main { @all_cards = network::ethernet::get_eth_cards(); %eth_intf = network::ethernet::get_eth_cards_names(@all_cards); require list_modules; - my @wmodules = list_modules::category2modules('network/wireless'); - %eth_intf = map { $_->[0] => join(': ', $_->[0], $_->[2]) } grep { int(!$is_wireless) ^ member($_->[1], @wmodules) } @all_cards; + %eth_intf = map { $_->[0] => join(': ', $_->[0], $_->[2]) } + grep { $is_wireless ^ !c::isNetDeviceWirelessAware($_->[0]) } @all_cards; }; my $find_lan_module = sub { @@ -175,7 +175,7 @@ sub real_main { ); my $offer_to_connect = sub { - return "ask_connect_now" if $netc->{internet_cnx_choice} eq 'adsl' && $adsl_devices{$ntf_name}; + return "ask_connect_now" if $netc->{internet_cnx_choice} eq 'adsl' && ($adsl_devices{$ntf_name} || $adsl_type eq 'pppoe'); return "ask_connect_now" if member($netc->{internet_cnx_choice}, qw(modem isdn)); return "end"; }; @@ -334,10 +334,6 @@ sub real_main { [ { label => N("Net Device"), type => "list", val => \$isdn_name, allow_empty_list => 1, list => [ $my_isdn, N("External ISDN modem"), keys %isdn_cards ] } ] }, - complete => sub { - $in->ask_warn(N("Warning"), N("Sorry, we support only 2.4 and above kernels.")) if c::kernel_version() !~ /^\Q2.4/; - return 0; - }, post => sub { # !intern_pci: # data => [ { val => \$isdn_type, type => "list", list => [ , ], } ], @@ -346,7 +342,7 @@ sub real_main { return "isdn_ask"; } elsif ($isdn_name eq N("External ISDN modem")) { detect($netc->{autodetect}, 'modem'); - $netc->{isdntype} = 'isdn_external'; + $netcnx->{type} = $netc->{isdntype} = 'isdn_external'; $netcnx->{isdn_external}{device} = network::modem::first_modem($netc); network::isdn::read_config($netcnx->{isdn_external}); $netcnx->{isdn_external}{special_command} = 'AT&F&O2B40'; @@ -653,12 +649,6 @@ killall pppd name => N("ADSL configuration") . "\n\n" . N("Select the network interface to configure:"), data => [ { label => N("Net Device"), type => "list", val => \$ntf_name, allow_empty_list => 1, list => \@adsl_devices, format => sub { $eth_intf{$_[0]} || $adsl_devices{$_[0]} } } ], - complete => sub { - if (c::kernel_version() !~ /^\Q2.4/ && $ntf_name eq 'speedtouch') { - $in->ask_warn(N("Warning"), N("Sorry, we support only 2.4 and above kernels.")); - } - return 0; - }, post => sub { my %packages = ( 'eci' => [ 'eciadsl', 'missing' ], @@ -836,7 +826,7 @@ You can find a driver on http://eciadsl.flashtux.org/"), pre => $lan_detect, name => N("Select the network interface to configure:"), data => sub { - [ { label => N("Net Device"), type => "list", val => \$ntf_name, list => [ N("Manual choice"), sort keys %eth_intf ], + [ { label => N("Net Device"), type => "list", val => \$ntf_name, list => [ (sort keys %eth_intf), N("Manual choice") ], allow_empty_list => 1, format => sub { $eth_intf{$_[0]} || $_[0] } } ]; }, post => sub { @@ -875,7 +865,7 @@ Modifying the fields below will override this configuration."), { pre => sub { $find_lan_module->(); - $auto_ip = $l10n_lan_protocols{defined $auto_ip ? ($auto_ip ? 'dhcp' : 'static') : $ethntf->{BOOTPROTO}} || 0; + $protocol = $l10n_lan_protocols{defined $auto_ip ? ($auto_ip ? 'dhcp' : 'static') : $ethntf->{BOOTPROTO}} || 0; }, name => sub { my $_msg = N("Zeroconf hostname resolution"); @@ -883,10 +873,10 @@ Modifying the fields below will override this configuration."), N("The following protocols can be used to configure an ethernet connection. Please choose the one you want to use") }, data => sub { - [ { val => \$auto_ip, type => "list", list => [ sort values %l10n_lan_protocols ] } ]; + [ { val => \$protocol, type => "list", list => [ sort values %l10n_lan_protocols ] } ]; }, post => sub { - $auto_ip = $auto_ip ne $l10n_lan_protocols{static} || 0; + $auto_ip = $protocol ne $l10n_lan_protocols{static} || 0; return 'lan_intf'; }, }, @@ -1320,11 +1310,6 @@ fi output_with_perm("$::prefix$network::tools::connect_prog", 0755, $connect_cmd) if $connect_cmd; $netcnx->{$_} = $netc->{$_} foreach qw(NET_DEVICE NET_INTERFACE); $netcnx->{type} =~ /adsl/ or run_program::rooted($::prefix, "/chkconfig --del adsl 2> /dev/null"); - - if ($::isInstall && $::o->{security} >= 3) { - require network::drakfirewall; - network::drakfirewall::main($in, $::o->{security} <= 3); - } } sub main { |