summaryrefslogtreecommitdiffstats
path: root/lib/network/netconnect.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-05-25 15:39:46 +0000
committerOlivier Blin <oblin@mandriva.com>2007-05-25 15:39:46 +0000
commit1d37bfdbbe874abd6dcb5563eea19f531de09e1c (patch)
tree74845e43ed8fa59c7aaafd1a87efaa6b0c83c228 /lib/network/netconnect.pm
parentc6ba983db7d5a82ee63599e775be0f8211447c72 (diff)
downloaddrakx-net-1d37bfdbbe874abd6dcb5563eea19f531de09e1c.tar
drakx-net-1d37bfdbbe874abd6dcb5563eea19f531de09e1c.tar.gz
drakx-net-1d37bfdbbe874abd6dcb5563eea19f531de09e1c.tar.bz2
drakx-net-1d37bfdbbe874abd6dcb5563eea19f531de09e1c.tar.xz
drakx-net-1d37bfdbbe874abd6dcb5563eea19f531de09e1c.zip
sync with 2007.1 (because of SVN loss)2007.1
Diffstat (limited to 'lib/network/netconnect.pm')
-rw-r--r--lib/network/netconnect.pm1200
1 files changed, 286 insertions, 914 deletions
diff --git a/lib/network/netconnect.pm b/lib/network/netconnect.pm
index adf7f20..ee47c56 100644
--- a/lib/network/netconnect.pm
+++ b/lib/network/netconnect.pm
@@ -11,22 +11,14 @@ use services;
use network::network;
use network::tools;
use network::thirdparty;
+use network::connection;
sub detect {
my ($modules_conf, $auto_detect, $o_class) = @_;
my %l = (
isdn => sub {
- require network::isdn;
- $auto_detect->{isdn} = network::isdn::detect_backend($modules_conf);
- },
- lan => sub { # ethernet
- require network::ethernet;
- modules::load_category($modules_conf, list_modules::ethernet_categories());
- $auto_detect->{lan} = { map { $_->[0] => $_->[1] } network::ethernet::get_eth_cards($modules_conf) };
- },
- adsl => sub {
- require network::adsl;
- $auto_detect->{adsl} = network::adsl::adsl_detect();
+ require network::connection::isdn;
+ $auto_detect->{isdn} = network::connection::isdn::detect_backend($modules_conf);
},
modem => sub {
$auto_detect->{modem} = { map { $_->{description} || "$_->{MANUFACTURER}|$_->{DESCRIPTION} ($_->{device})" => $_ } detect_devices::getModem($modules_conf) };
@@ -59,30 +51,17 @@ sub real_main {
my ($net, $in, $modules_conf) = @_;
#- network configuration should have been already read in $net at this point
my $mouse = $::o->{mouse} || {};
- my ($cnx_type, @all_cards, %eth_intf, %all_eth_intf, %unavailable_wireless_intf);
- my (%connections, @connection_list);
+ my (@connections_list, $connection, @providers_data, $provider_name, $protocol_settings, $access_settings, $control_settings);
+ my $connection_compat;
+ my ($hardware_settings, $network_access_settings, $address_settings, $hostname_settings);
my ($modem, $modem_name, $modem_dyn_dns, $modem_dyn_ip);
- my $cable_no_auth;
- my (@adsl_devices, %adsl_cards, %adsl_data, $adsl_data, $adsl_provider, $adsl_old_provider, $adsl_vpi, $adsl_vci);
- my ($ntf_name, $gateway_ex, $up);
+ my ($up);
my ($isdn, $isdn_name, $isdn_type, %isdn_cards, @isdn_dial_methods);
my $my_isdn = join('', N("Manual choice"), " (", N("Internal ISDN card"), ")");
- my (@ndiswrapper_drivers, $ndiswrapper_driver, $ndiswrapper_device);
- my ($is_wireless, $wireless_enc_mode, $wireless_enc_key, $need_rt2x00_iwpriv, $wireless_roaming, $need_wpa_supplicant);
- my ($dvb_adapter, $dvb_ad, $dvb_net, $dvb_pid);
- my ($module, $auto_ip, $protocol, $onboot, $needhostname, $peerdns, $peeryp, $peerntpd, $ifplugd, $track_network_id, $ipv6_tunnel, $need_network_restart);
my $success = 1;
- my $ethntf = {};
my $db_path = "/usr/share/apps/kppp/Provider";
my (%countries, @isp, $country, $provider, $old_provider);
- my %l10n_lan_protocols = (
- static => N("Manual configuration"),
- dhcp => N("Automatic IP (BOOTP/DHCP)"),
- if_(0,
- dhcp_zeroconf => N("Automatic IP (BOOTP/DHCP/Zeroconf)"),
- )
- );
my $_w = N("Protocol for the rest of the world");
my %isdn_protocols = (
2 => N("European protocol (EDSS1)"),
@@ -91,56 +70,6 @@ sub real_main {
$net->{autodetect} = {};
- my $lan_detect = sub {
- detect($modules_conf, $net->{autodetect}, 'lan');
- @all_cards = network::ethernet::get_eth_cards($modules_conf);
- %all_eth_intf = network::ethernet::get_eth_cards_names(@all_cards); #- needed not to loose GATEWAYDEV
- %eth_intf = map { $_->[0] => join(': ', $_->[0], $_->[2] || N("Unknown driver")) }
- grep { to_bool($is_wireless) == detect_devices::is_wireless_interface($_->[0]) } @all_cards;
- my %available;
- $available{$_->[2]} = undef foreach grep { $_->[2] } @all_cards;
- %unavailable_wireless_intf = map {
- $_->{driver} => sprintf('%s (%s): %s', N("unknown"), $_->{driver}, $_->{description});
- } grep { !exists($available{$_->{description}}) } modules::probe_category('network/wireless');
- };
-
- my $is_dvb_interface = sub { $_[0]{DEVICE} =~ /^dvb\d+_\d+/ };
-
- my $find_lan_module = sub {
- if (my $dev = find { $_->{device} eq $ethntf->{DEVICE} } detect_devices::pcmcia_probe()) { # PCMCIA case
- $module = $dev->{driver};
- } elsif ($dev = find { $_->[0] eq $ethntf->{DEVICE} } @all_cards) {
- $module = $dev->[1];
- } elsif ($is_dvb_interface->($ethntf)) {
- $module = $dvb_adapter->{driver};
- } else { $module = "" }
- };
-
- my %adsl_descriptions = (
- speedtouch => N("Alcatel speedtouch USB modem"),
- sagem => N("Sagem USB modem"),
- bewan => N("Bewan modem"),
- eci => N("ECI Hi-Focus modem"), # this one needs eci agreement
- );
-
- my %adsl_types = (
- dhcp => N("Dynamic Host Configuration Protocol (DHCP)"),
- static => N("Manual TCP/IP configuration"),
- pptp => N("Point to Point Tunneling Protocol (PPTP)"),
- pppoe => N("PPP over Ethernet (PPPoE)"),
- pppoa => N("PPP over ATM (PPPoA)"),
- capi => N("DSL over CAPI"),
- );
-
- my %encapsulations = (
- 1 => N("Bridged Ethernet LLC"),
- 2 => N("Bridged Ethernet VC"),
- 3 => N("Routed IP LLC"),
- 4 => N("Routed IP VC"),
- 5 => N("PPPoA LLC"),
- 6 => N("PPPoA VC"),
- );
-
my %ppp_auth_methods = (
0 => N("Script-based"),
1 => N("PAP"),
@@ -149,95 +78,34 @@ sub real_main {
4 => N("PAP/CHAP"),
);
- my $offer_to_connect = sub {
- #- FIXME: create $try_to_connect sub out of this code
- #- merge with "ask_connect_now" post code
- if ($net->{type} eq 'adsl' && !member($net->{adsl}{method}, qw(static dhcp)) ||
- member($net->{type}, qw(modem isdn isdn_external))) {
- return "ask_connect_now";
- }
-
- unless ($::isInstall) {
- if ($need_network_restart) {
- services::restart("network");
- } else {
- #- FIXME: move this in network::tools::restart_net_interface
- network::tools::stop_net_interface($net, 0);
- if (exists $net->{adsl}{ethernet_device}) {
- network::tools::stop_interface($net->{adsl}{ethernet_device}, 0);
- network::tools::start_interface($net->{adsl}{ethernet_device}, 0);
- }
- network::tools::start_net_interface($net, 0);
- }
- }
- #- FIXME: check for connection here
- #- check for real interface in connection test
- #- don't block when checking connection
- #- return "after_connect" (old "disconnect" step)
- return "end";
- };
-
- my $after_lan_intf_selection = sub { $is_wireless ? 'wireless' : 'lan_protocol' };
-
- my $after_start_on_boot_step = sub {
- #- can't be done in adsl_account step because of static/dhcp adsl methods
- #- we need to write sagem specific parameters and load corresponding modules/programs (sagem/speedtouch)
- $net->{type} eq 'adsl' and network::adsl::adsl_conf_backend($in, $modules_conf, $net);
-
- network::network::configure_network($net, $in, $modules_conf);
- #- FIXME: always run "ask_connect_now"
- return $offer_to_connect->();
- };
-
- my $goto_start_on_boot_ifneeded = sub {
- return $after_start_on_boot_step->() if $net->{type} eq "lan";
- return "isdn_dial_on_boot" if $net->{type} eq 'isdn';
- return "network_on_boot";
- };
-
- my $delete_gateway_settings = sub {
- my ($device) = @_;
- #- delete gateway settings if gateway device is invalid or matches the reconfigured device
- if (!$net->{network}{GATEWAYDEV} || !exists $eth_intf{$net->{network}{GATEWAYDEV}} || $net->{network}{GATEWAYDEV} eq $device) {
- delete $net->{network}{GATEWAY};
- delete $net->{network}{GATEWAYDEV};
- }
- };
-
- my $ndiswrapper_do_device_selection = sub {
- $ntf_name = network::ndiswrapper::setup_device($in, $ndiswrapper_device);
- unless ($ntf_name) {
- undef $ndiswrapper_device;
- return;
- }
-
- #- redetect interfaces (so that the ndiswrapper module can be detected)
- $lan_detect->();
-
- $ethntf = $net->{ifcfg}{$ntf_name} ||= { DEVICE => $ntf_name };
-
- 1;
- };
-
- my $ndiswrapper_do_driver_selection = sub {
- my @devices = network::ndiswrapper::get_devices($in, $ndiswrapper_driver);
-
- if (!@devices) {
- undef $ndiswrapper_driver;
- return;
- } elsif (@devices == 1) {
- #- only one device matches installed driver
- $ndiswrapper_device = $devices[0];
- return $ndiswrapper_do_device_selection->();
+ my %steps_compat = (
+ 'network::connection::isdn' => 'isdn',
+ 'network::connection::pots' => 'modem',
+ );
+
+ my $get_next = sub {
+ my ($step) = @_;
+ my @steps = (
+ "select_connection" => sub { 0 },
+ "configure_hardware" => sub { $connection->can('get_hardware_settings') && !$connection->{device}{no_hardware_settings} },
+ #- network is for example wireless/3G access point
+ "select_network" => sub { $connection->can('get_networks') },
+ "configure_network_access" => sub { $connection->can('get_network_access_settings') },
+ #- allow to select provider after network
+ "select_provider" => sub { $connection->can('get_providers') },
+ #- protocol may depend on provider settings (xDSL)
+ "select_protocol" => sub { $connection->can('get_protocols') },
+ #- peer settings may depend on provider and protocol (VPI/VCI for xDSL)
+ "configure_access" => sub { $connection->can('get_access_settings') },
+ "configure_address" => sub { $connection->can('get_address_settings') || $connection->can('get_hostname_settings') },
+ "configure_control" => sub { $connection->can('get_control_settings') },
+ "apply_connection" => sub { 1 },
+ );
+ my $can;
+ foreach (group_by2(@steps)) {
+ $can && $_->[1]->() and return $_->[0];
+ $can ||= $_->[0] eq $step;
}
-
- 1;
- };
-
- my $ndiswrapper_next_step = sub {
- return $ndiswrapper_device ? $after_lan_intf_selection->() :
- $ndiswrapper_driver ? 'ndiswrapper_select_device' :
- 'ndiswrapper_select_driver';
};
use locale;
@@ -249,39 +117,199 @@ sub real_main {
defaultimage => "drakconnect.png",
name => N("Network & Internet Configuration"),
pages => {
- welcome =>
- {
- pre => sub {
- my @connections = (
- [ N("LAN connection"), "lan" ],
- [ N("Wireless connection"), "lan" ],
- [ N("ADSL connection"), "adsl" ],
- [ N("Cable connection"), "cable" ],
- [ N("ISDN connection"), "isdn" ],
- [ N("Modem connection"), "modem" ],
- [ N("DVB connection"), "dvb" ],
- );
-
- foreach (@connections) {
- my ($string, $type) = @$_;
- $connections{$string} = $type;
- }
- @connection_list = { val => \$cnx_type, type => 'list', list => [ map { $_->[0] } @connections ], };
- },
+ welcome => {
+ pre => sub { undef $net->{type} },
if_(!$::isInstall, no_back => 1),
name => N("Choose the connection you want to configure"),
interactive_help_id => 'configureNetwork',
- data => \@connection_list,
- post => sub {
- $is_wireless = $cnx_type eq N("Wireless connection");
- return $net->{type} = $connections{$cnx_type};
+ data => [ { list => [ network::connection::get_types ],
+ type => 'list', val => \$net->{type}, format => sub { $_[0] && $_[0]->get_type_description },
+ gtk => { use_scrolling => 1 } } ],
+ complete => sub {
+ my @packages = $net->{type}->can('get_packages') ? $net->{type}->get_packages : ();
+ if (@packages && !$in->do_pkgs->install(@packages)) {
+ $in->ask_warn(N("Error"), N("Could not install the packages (%s)!", join(', ', @packages)));
+ 1;
+ }
},
+ post => sub {
+ if (exists $steps_compat{$net->{type}}) {
+ return $steps_compat{$net->{type}};
+ }
+ @connections_list = $net->{type}->get_connections;
+ @connections_list ? "select_connection" : "no_connection";
+ },
+ },
+
+ select_connection => {
+ name => sub { $net->{type}->get_type_name . "\n\n" . N("Select the network interface to configure:") },
+ data => [ { val => \$connection, type => 'list', list => \@connections_list,
+ format => sub { $_[0] && $_[0]->get_description }, allow_empty_list => 1 } ],
+ complete => sub {
+ $connection->setup_thirdparty($in) or return 1;
+ $connection->prepare_device;
+ if ($connection->can("check_device") && !$connection->check_device) {
+ $in->ask_warn('', $connection->{device}{error});
+ return 1;
+ }
+ return 0;
+ },
+ post => sub {
+ $connection->load_interface_settings;
+ $get_next->("select_connection");
+ },
+ },
+
+ no_connection => {
+ name => sub { $net->{type}->get_type_name . "\n\n" . N("No device can be found for this connection type.") },
+ end => 1,
+ },
+
+ configure_hardware => {
+ pre => sub {
+ $hardware_settings = $connection->get_hardware_settings;
+ $connection->guess_hardware_settings if $connection->can('guess_hardware_settings');
+ },
+ name => sub { $net->{type}->get_type_name . "\n\n" . N("Hardware Configuration") },
+ data => sub { $hardware_settings },
+ complete => sub {
+ if ($connection->can('check_hardware')) {
+ my $_w = $in->wait_message('', N("Configuring device..."));
+ if (!$connection->check_hardware) {
+ $in->ask_warn(N("Error"), $connection->{hardware}{error}) if $connection->{hardware}{error};
+ return 1;
+ }
+ }
+ },
+ post => sub { $get_next->("configure_hardware") },
+ },
+
+ select_provider => {
+ pre => sub {
+ @providers_data = $connection->get_providers;
+ require lang;
+ my $locale_country = lang::c2name($::o->{locale}{country} || lang::read()->{country});
+ $provider_name = find { /^$locale_country/ } sort(keys %{$providers_data[0]});
+ },
+ name => sub { $net->{type}->get_type_name . "\n\n" . N("Please select your provider:") },
+ data => sub {
+ [ { type => "list", val => \$provider_name, separator => $providers_data[1],
+ list => [ N("Unlisted - edit manually"), sort(keys %{$providers_data[0]}) ], sort => 0 } ];
+ },
+ post => sub {
+ if ($provider ne N("Unlisted - edit manually")) {
+ $connection->set_provider($providers_data[0]{$provider_name});
+ }
+ $get_next->("select_provider");
+ },
+ },
+
+ select_network => {
+ pre => sub {
+ my $_w = $in->wait_message('', N("Scanning for networks..."));
+ $connection->get_networks;
+ },
+ name => sub { $net->{type}->get_type_name . "\n\n" . N("Please select your network:") },
+ data => sub {
+ [ { type => "list", val => \$connection->{network}, allow_empty_list => 1,
+ list => [ keys %{$connection->{networks}}, undef ], gtk => { use_scrolling => 1 },
+ format => sub { exists $connection->{networks}{$_[0]} ?
+ $connection->{networks}{$_[0]}{name} :
+ N("Unlisted - edit manually");
+ } } ];
+ },
+ post => sub {
+ $get_next->("select_network");
+ },
+ },
+
+ configure_network_access => {
+ pre => sub {
+ $network_access_settings = $connection->get_network_access_settings;
+ $connection->guess_network_access_settings if $connection->can('guess_network_access_settings');
+ },
+ name => sub { $net->{type}->get_type_name . "\n\n" . $connection->get_network_access_settings_label },
+ data => sub { $network_access_settings },
+ post => sub { $get_next->("configure_network_access") },
+ },
+
+ select_protocol => {
+ pre => sub {
+ $protocol_settings = $connection->get_protocol_settings;
+ $connection->guess_protocol($net) if $connection->can('guess_protocol');
+ },
+ name => sub { $net->{type}->get_type_name . "\n\n" . N("Please select your connection protocol.
+If you do not know it, keep the preselected protocol.") },
+ data => sub { $protocol_settings },
+ post => sub { $get_next->("select_protocol") },
+ },
+
+ configure_access => {
+ pre => sub {
+ $access_settings = $connection->get_access_settings;
+ $connection->guess_access_settings if $connection->can('guess_access_settings');
+ },
+ name => sub { $net->{type}->get_type_name . "\n\n" . $connection->get_access_settings_label },
+ data => sub { $access_settings },
+ post => sub { $get_next->("configure_access") },
+ },
+
+ configure_address => {
+ pre => sub {
+ $address_settings = $connection->can('get_address_settings') && $connection->get_address_settings;
+ $connection->guess_address_settings if $connection->can('guess_address_settings');
+ $hostname_settings = $connection->can('get_hostname_settings') && $connection->get_hostname_settings;
+ $connection->guess_hostname_settings if $connection->can('guess_hostname_settings');
+ },
+ name => sub { $net->{type}->get_type_name . "\n\n" . $connection->get_address_settings_label },
+ data => sub { [ @$address_settings, @$hostname_settings ] },
+ complete => sub {
+ if ($connection->can('check_address_settings') && !$connection->check_address_settings($net)) {
+ $in->ask_warn(N("Error"), $connection->{address}{error}{message});
+ my $index = eval { find_index { $_->{val} eq $connection->{address}{error}{field} } @$address_settings };
+ return 1, $index;
+ }
+ return 0;
+ },
+ post => sub { $get_next->("configure_address") },
+ },
+
+ configure_control => {
+ pre => sub {
+ $control_settings = $connection->get_control_settings;
+ $connection->can('get_network_control_settings') and
+ push @$control_settings, @{$connection->get_network_control_settings};
+ $connection->guess_control_settings if $connection->can('guess_control_settings');
+ $connection->guess_network_control_settings if $connection->can('guess_network_control_settings');
+ },
+ name => sub { $net->{type}->get_type_name . "\n\n" . N("Connection control") },
+ data => sub { $control_settings },
+ post => sub { $get_next->("configure_control") },
+ },
+
+ apply_connection => {
+ name => N("Do you want to start the connection now?"),
+ type => "yesorno",
+ complete => sub {
+ $connection->can('install_packages') && !$connection->install_packages($in);
+ },
+ post => sub {
+ my ($answer) = @_;
+ $connection->unload_connection if $connection->can('unload_connection');
+ $connection->write_settings($net, $modules_conf);
+ $connection->prepare_connection if $connection->can('prepare_connection');
+ if ($answer) {
+ $connection->disconnect;
+ $connection->connect;
+ }
+ "end"; #- handle disconnection in install?
+ },
},
isdn_account =>
{
pre => sub {
- network::isdn::get_info_providers_backend($isdn, $provider);
+ network::connection::isdn::get_info_providers_backend($isdn, $provider);
$isdn->{huptimeout} ||= 180;
},
name => N("Connection Configuration") . "\n\n" . N("Please fill or check the field below"),
@@ -305,38 +333,10 @@ sub real_main {
];
},
post => sub {
- network::isdn::write_config($in, $isdn);
+ network::connection::isdn::apply_config($in, $isdn);
$net->{net_interface} = 'ippp0';
- "allow_user_ctl";
- },
- },
-
- cable =>
- {
- pre => sub {
- $cable_no_auth = sub { $net->{cable}{bpalogin} eq N("None") };
- },
- name => N("Cable: account options"),
- data => sub {
- [
- { label => N("Authentication"), type => "list", val => \$net->{cable}{bpalogin}, list => [ N("None"), N("Use BPALogin (needed for Telstra)") ] },
- { label => N("Account Login (user name)"), val => \$net->{cable}{login}, disabled => $cable_no_auth },
- { label => N("Account Password"), val => \$net->{cable}{passwd}, hidden => 1, disabled => $cable_no_auth },
- ];
- },
- complete => sub {
- !$cable_no_auth->() && !$in->do_pkgs->ensure_is_installed('bpalogin', '/usr/sbin/bpalogin');
+ "isdn_dial_on_boot";
},
- post => sub {
- my $use_bpalogin = !$cable_no_auth->();
- $use_bpalogin and substInFile {
- s/username\s+.*\n/username $net->{cable}{login}\n/;
- s/password\s+.*\n/password $net->{cable}{passwd}\n/;
- } "$::prefix/etc/bpalogin.conf";
- services::set_status("bpalogin", $use_bpalogin);
- $auto_ip = 1;
- return "lan";
- }
},
isdn =>
@@ -366,11 +366,11 @@ sub real_main {
$isdn->{description} =~ s/\|/ -- /;
}
- network::isdn::read_config($isdn);
+ network::connection::isdn::read_config($isdn);
$isdn->{driver} = $isdn_cards{$isdn_name}{driver}; #- do not let config overwrite default driver
#- let the user choose hisax or capidrv if both are available
- $isdn->{driver} ne "capidrv" && network::isdn::get_capi_card($in, $isdn) and return "isdn_driver";
+ $isdn->{driver} ne "capidrv" && network::connection::isdn::get_capi_card($in, $isdn) and return "isdn_driver";
return "isdn_protocol";
},
},
@@ -379,7 +379,7 @@ sub real_main {
isdn_ask =>
{
pre => sub {
- %isdn_cards = network::isdn::get_cards();
+ %isdn_cards = network::connection::isdn::get_cards();
},
name => N("Select a device!"),
data => sub { [ { label => N("Net Device"), val => \$isdn_name, type => 'list', separator => '|', list => [ keys %isdn_cards ], allow_empty_list => 1 } ] },
@@ -413,7 +413,7 @@ If you have a PCMCIA card, you have to know the \"irq\" and \"io\" of your card.
$e = $in->ask_from_listf(N("ISDN Configuration"),
N("Which of the following is your ISDN card?"),
sub { $_[0]{description} },
- [ network::isdn::get_cards_by_type($isdn->{card_type}) ]) or goto($isdn->{card_type} =~ /usb|pci/ ? 'isdn_ask_step_1' : 'isdn_ask_step_1b');
+ [ network::connection::isdn::get_cards_by_type($isdn->{card_type}) ]) or goto($isdn->{card_type} =~ /usb|pci/ ? 'isdn_ask_step_1' : 'isdn_ask_step_1b');
$e->{$_} and $isdn->{$_} = $e->{$_} foreach qw(driver type mem io io0 io1 irq firmware);
},
@@ -460,7 +460,7 @@ If you have a PCMCIA card, you have to know the \"irq\" and \"io\" of your card.
name => N("ISDN Configuration") . "\n\n" . N("Select your provider.\nIf it is not listed, choose Unlisted."),
data => sub {
[ { label => N("Provider:"), type => "list", val => \$provider, separator => '|',
- list => [ N("Unlisted - edit manually"), network::isdn::read_providers_backend() ] } ];
+ list => [ N("Unlisted - edit manually"), network::connection::isdn::read_providers_backend() ] } ];
},
next => "isdn_account",
},
@@ -497,9 +497,11 @@ Take a look at http://www.linmodems.org"),
#- some modem configuration programs modify modprobe.conf while we're loaded
#- so write it now and reload then
$modules_conf->write;
- my $ret = network::thirdparty::setup_device($in, 'rtc', $driver, $modem, qw(device));
- $modules_conf->read if $ret;
- !$ret;
+ require network::connection::pots;
+ my $settings = network::thirdparty::apply_settings($in, 'pots', network::connection::pots::get_thirdparty_settings(), $driver);
+ $modem->{device} = $settings->{device} if $settings;
+ $modules_conf->read if $settings;
+ !$settings;
},
post => sub {
return 'choose_serial_port' if $modem_name eq N("Manual choice");
@@ -526,7 +528,7 @@ Take a look at http://www.linmodems.org"),
interactive_help_id => 'selectSerialPort',
data => sub {
[ { val => \$modem->{device}, format => \&mouse::serial_port2text, type => "list",
- list => [ grep { $_ ne $mouse->{device} } (mouse::serial_ports(), grep { -e $_ } '/dev/modem', '/dev/ttySL0', '/dev/ttyS14',) ] } ];
+ list => [ grep { $_ ne $mouse->{device} } (mouse::serial_ports(), glob_("/dev/ttyUSB*"), grep { -e $_ } '/dev/modem', '/dev/ttySL0', '/dev/ttyS14',) ] } ];
},
post => sub {
return 'ppp_provider';
@@ -639,669 +641,27 @@ Take a look at http://www.linmodems.org"),
post => sub {
network::modem::ppp_configure($net, $in, $modem);
$net->{net_interface} = 'ppp0';
- "allow_user_ctl";
- },
- },
-
-
- adsl =>
- {
- pre => sub {
- $lan_detect->();
- @adsl_devices = keys %eth_intf;
-
- detect($modules_conf, $net->{autodetect}, 'adsl');
- %adsl_cards = ();
- foreach my $modem_type (keys %{$net->{autodetect}{adsl}}) {
- foreach my $modem (@{$net->{autodetect}{adsl}{$modem_type}}) {
- my $name = join(': ', $adsl_descriptions{$modem_type}, $modem->{description});
- $adsl_cards{$name} = [ $modem_type, $modem ];
- }
- }
- push @adsl_devices, keys %adsl_cards;
-
- detect($modules_conf, $net->{autodetect}, 'isdn');
- if (my @isdn_modems = @{$net->{autodetect}{isdn}}) {
- require network::isdn;
- %isdn_cards = map { $_->{description} => $_ } grep { $_->{driver} =~ /dsl/i } map { network::isdn::get_capi_card($in, $_) } @isdn_modems;
- push @adsl_devices, keys %isdn_cards;
- }
- },
- 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]} || $_[0] } } ],
- complete => sub {
- exists $adsl_cards{$ntf_name} && !network::thirdparty::setup_device($in, 'dsl', $adsl_cards{$ntf_name}[0]);
- },
- post => sub {
- if (exists $adsl_cards{$ntf_name}) {
- my $modem;
- ($ntf_name, $modem) = @{$adsl_cards{$ntf_name}};
- $net->{adsl}{bus} = $modem->{bus} if $ntf_name eq 'bewan';
- }
- if (exists($isdn_cards{$ntf_name})) {
- require network::isdn;
- $net->{adsl}{capi_card} = $isdn_cards{$ntf_name};
- $net->{adsl}{method} = "capi";
- return 'adsl_account';
- }
- return 'adsl_provider';
- },
- },
-
-
- adsl_provider =>
- {
- pre => sub {
- require network::adsl_consts;
- %adsl_data = %network::adsl_consts::adsl_data if is_empty_hash_ref(\%adsl_data);
- $adsl_old_provider = $adsl_provider;
- if (!$adsl_provider) {
- require lang;
- my $locale_country = lang::c2name($::o->{locale}{country} || lang::read()->{country});
- $adsl_provider = find { /^$locale_country/ } sort(keys %adsl_data);
- }
- },
- name => N("Please choose your ADSL provider"),
- data => sub {
- [ { label => N("Provider:"), type => "list", val => \$adsl_provider, separator => '|',
- list => [ sort(N("Unlisted - edit manually"), keys %adsl_data) ], sort => 0 } ];
- },
- post => sub {
- $net->{adsl}{method} = 'pppoa' if member($ntf_name, qw(bewan speedtouch));
- if ($adsl_provider ne N("Unlisted - edit manually")) {
- $adsl_data = $adsl_data{$adsl_provider};
- if ($adsl_provider ne $adsl_old_provider) {
- $net->{adsl}{$_} = $adsl_data->{$_} foreach qw(Encapsulation vpi vci provider_id method);
- $net->{resolv}{$_} = $adsl_data->{$_} foreach qw(DOMAINNAME2);
- }
- }
- return 'adsl_protocol';
- },
- },
-
-
- adsl_protocol =>
- {
- pre => sub {
- # preselect right protocol for ethernet though connections:
- if (!exists $adsl_descriptions{$ntf_name}) {
- $ethntf = $net->{ifcfg}{$ntf_name} ||= { DEVICE => $ntf_name };
- $net->{adsl}{method} ||= $ethntf->{BOOTPROTO} || "dhcp";
- #- pppoa shouldn't be selected by default for ethernet devices, fallback on pppoe
- $net->{adsl}{method} = "pppoe" if $net->{adsl}{method} eq "pppoa";
- }
- },
- name => N("Please choose your DSL connection type.
-If you do not know it, keep the preselected type."),
- data => [
- { text => N("ADSL connection type:"), val => \$net->{adsl}{method}, type => "list",
- list => [ sort { $adsl_types{$a} cmp $adsl_types{$b} } keys %adsl_types ],
- format => sub { $adsl_types{$_[0]} },
- },
- ],
- post => sub {
- my $real_interface = $ntf_name;
- $net->{type} = 'adsl';
- # blacklist bogus driver, enable ifplugd support else:
- $find_lan_module->();
- $ethntf->{MII_NOT_SUPPORTED} ||= bool2yesno(network::ethernet::is_ifplugd_blacklisted($module));
- if ($ntf_name eq "sagem" && member($net->{adsl}{method}, qw(static dhcp))) {
- #- "fctStartAdsl -i" builds ifcfg-ethX from ifcfg-sagem and echoes ethX
- #- it auto-detects dhcp/static modes thanks to encapsulation setting
- $ethntf = $net->{ifcfg}{sagem} ||= {};
- $ethntf->{DEVICE} = "`/usr/sbin/fctStartAdsl -i`";
- $ethntf->{MII_NOT_SUPPORTED} = "yes";
- }
- if ($ntf_name eq "speedtouch" && member($net->{adsl}{method}, qw(static dhcp))) {
- #- use ATMARP with the atm0 interface
- $real_interface = "atm0";
- $ethntf = $net->{ifcfg}{$real_interface} ||= {};
- $ethntf->{DEVICE} = $real_interface;
- $ethntf->{ATM_ADDR} = undef;
- $ethntf->{MII_NOT_SUPPORTED} = "yes";
- }
- #- delete gateway settings if gateway device is invalid or if reconfiguring the gateway interface
- exists $net->{ifcfg}{$real_interface} and $delete_gateway_settings->($real_interface);
- # process static/dhcp ethernet devices:
- if (exists($net->{ifcfg}{$real_interface}) && member($net->{adsl}{method}, qw(static dhcp))) {
- $ethntf->{TYPE} = "ADSL";
- $auto_ip = $net->{adsl}{method} eq 'dhcp';
- return 'lan_intf';
- }
- member($net->{adsl}{method}, qw(pppoe pptp)) and $net->{adsl}{ethernet_device} = $ntf_name;
- return 'adsl_account';
- },
- },
-
-
- adsl_account =>
- {
- pre => sub {
- network::adsl::adsl_probe_info($net);
- $net->{net_interface} = 'ppp0';
- $net->{ifcfg}{ppp0} ||= {};
- ($adsl_vpi, $adsl_vci) = (hex($net->{adsl}{vpi}), hex($net->{adsl}{vci}));
- },
- name => N("Connection Configuration") . "\n\n" .
- N("Please fill or check the field below"),
- data => sub {
- [
- if_(0, { label => N("Provider name (ex provider.net)"), val => \$net->{resolv}{DOMAINNAME2} }),
- { label => N("First DNS Server (optional)"), val => \$net->{resolv}{dnsServer2} },
- { label => N("Second DNS Server (optional)"), val => \$net->{resolv}{dnsServer3} },
- { label => N("Account Login (user name)"), val => \$net->{adsl}{login} },
- { label => N("Account Password"), val => \$net->{adsl}{passwd}, hidden => 1 },
- if_($net->{adsl}{method} ne "capi",
- { label => N("Virtual Path ID (VPI):"), val => \$adsl_vpi, advanced => 1 },
- { label => N("Virtual Circuit ID (VCI):"), val => \$adsl_vci, advanced => 1 }
- ),
- if_($ntf_name eq "sagem",
- { label => N("Encapsulation:"), val => \$net->{adsl}{Encapsulation}, list => [ keys %encapsulations ],
- format => sub { $encapsulations{$_[0]} }, advanced => 1,
- },
- ),
- ];
- },
- post => sub {
- #- update ATM_ADDR for ATMARP connections
- exists $ethntf->{ATM_ADDR} and $ethntf->{ATM_ADDR} = join('.', $adsl_vpi, $adsl_vci);
- #- convert VPI/VCI back to hex
- ($net->{adsl}{vpi}, $net->{adsl}{vci}) = map { sprintf("%x", $_) } ($adsl_vpi, $adsl_vci);
-
- $net->{adsl}{device} =
- $net->{adsl}{method} eq 'capi' ? 'capi_modem' :
- $net->{adsl}{method} eq 'pptp' ? 'pptp_modem' :
- $ntf_name;
- # FIXME: duplicate with $after_start_on_boot_step sub
- network::adsl::adsl_conf_backend($in, $modules_conf, $net);
- "allow_user_ctl";
- },
- },
-
-
- lan =>
- {
- pre => $lan_detect,
- name => N("Select the network interface to configure:"),
- data => sub {
- [ { label => N("Net Device"), type => "list", val => \$ntf_name, list => [
- (sort keys %eth_intf, if_($is_wireless, keys %unavailable_wireless_intf)),
- N_("Manually load a driver"),
- if_($is_wireless, N_("Use a Windows driver (with ndiswrapper)")),
- ], allow_empty_list => 1, format => sub {
- translate($eth_intf{$_[0]} || $unavailable_wireless_intf{$_[0]} || $_[0]) } } ];
- },
- complete => sub {
- if (any { $_->[0] eq $ntf_name && !$_->[1] } @all_cards) {
- $in->ask_warn(N("Error"), N("Unknown driver"));
- return 1;
- }
-
- if ($ntf_name eq "Use a Windows driver (with ndiswrapper)") {
- require network::ndiswrapper;
- $in->do_pkgs->ensure_is_installed('ndiswrapper', '/usr/sbin/ndiswrapper') or return 1;
- undef $ndiswrapper_driver;
- undef $ndiswrapper_device;
- unless (network::ndiswrapper::installed_drivers()) {
- $ndiswrapper_driver = network::ndiswrapper::ask_driver($in) or return 1;
- return !$ndiswrapper_do_driver_selection->();
- }
- }
- if (exists $unavailable_wireless_intf{$ntf_name}) {
- my $driver = $ntf_name;
- network::thirdparty::setup_device($in, 'wireless', $driver) or return 1;
- eval {
- modules::unload($driver);
- modules::load($driver);
- };
- $lan_detect->();
- my $eth_card = find { $_->[1] eq $driver } @all_cards;
- unless ($eth_card) {
- #- FIXME (#17545)
- #- "No matching device found for driver %s."
- #- "The driver has probably failed to load because of a missing firmware
- #- or because it doesn't support your card revision.
- #- Have a look at /var/log/messages to find additional information."
- $in->ask_warn(N("Error"), N("No device found"));
- return 1;
- }
- $ntf_name = $eth_card->[0];
- }
- 0;
- },
- post => sub {
- if ($ntf_name eq "Manually load a driver") {
- require modules::interactive;
- modules::interactive::load_category__prompt($in, $modules_conf, list_modules::ethernet_categories());
- return 'lan';
- } elsif ($ntf_name eq "Use a Windows driver (with ndiswrapper)") {
- return $ndiswrapper_next_step->();
- }
- $ethntf = $net->{ifcfg}{$ntf_name} ||= { DEVICE => $ntf_name };
- return $after_lan_intf_selection->();
- },
- },
-
-
- lan_protocol =>
- {
- pre => sub {
- $find_lan_module->();
- $ethntf->{METRIC} = network::tools::get_default_metric(network::tools::get_interface_type($ethntf, $module))
- unless defined($ethntf->{METRIC});
- $protocol = $l10n_lan_protocols{defined $auto_ip ? ($auto_ip ? 'dhcp' : 'static') : $ethntf->{BOOTPROTO}} || 0;
- },
- name => sub {
- my $_msg = N("Zeroconf hostname resolution");
- N("Configuring network device %s (driver %s)", $ethntf->{DEVICE}, $module) . "\n\n" .
- N("The following protocols can be used to configure a LAN connection. Please choose the one you want to use");
- },
- data => sub {
- [ { val => \$protocol, type => "list", list => [ sort values %l10n_lan_protocols ] } ];
- },
- post => sub {
- $auto_ip = $protocol ne $l10n_lan_protocols{static} || 0;
- return 'lan_intf';
- },
- },
-
-
- lan_intf =>
- {
- pre => sub {
- require network::ethernet;
- $onboot = $ethntf->{ONBOOT} ? $ethntf->{ONBOOT} =~ /yes/ : bool2yesno(!member($ethntf->{DEVICE},
- map { $_->{device} } detect_devices::pcmcia_probe()));
- $needhostname = $ethntf->{NEEDHOSTNAME} !~ /no/;
- $peerdns = $ethntf->{PEERDNS} !~ /no/;
- $peeryp = $ethntf->{PEERYP} =~ /yes/;
- $peerntpd = $ethntf->{PEERNTPD} =~ /yes/;
- # blacklist bogus driver, enable ifplugd support else:
- $ifplugd = !text2bool($ethntf->{MII_NOT_SUPPORTED}) && !network::ethernet::is_ifplugd_blacklisted($module);
- $track_network_id = $::isStandalone && $ethntf->{HWADDR} || detect_devices::isLaptop();
- delete $ethntf->{TYPE} if $net->{type} ne 'adsl' || !member($net->{adsl}{method}, qw(static dhcp));
- $ethntf->{DHCP_CLIENT} ||= (find { -x "$::prefix/sbin/$_" } qw(dhclient dhcpcd pump dhcpxd));
- $ipv6_tunnel = text2bool($ethntf->{IPV6TO4INIT});
- },
- name => sub { join('',
- N("Configuring network device %s (driver %s)", $ethntf->{DEVICE}, $module),
- if_(!$auto_ip, "\n\n" . N("Please enter the IP configuration for this machine.
-Each item should be entered as an IP address in dotted-decimal
-notation (for example, 1.2.3.4).")),
- ) },
- data => sub {
- [ $auto_ip ?
- (
- { text => N("Assign host name from DHCP address"), val => \$needhostname, type => "bool" },
- { label => N("DHCP host name"), val => \$ethntf->{DHCP_HOSTNAME} },
- )
- :
- (
- { label => N("IP address"), val => \$ethntf->{IPADDR}, disabled => sub { $auto_ip } },
- { label => N("Netmask"), val => \$ethntf->{NETMASK}, disabled => sub { $auto_ip } },
- ),
- { text => N("Track network card id (useful for laptops)"), val => \$track_network_id, type => "bool" },
- { text => N("Network Hotplugging"), val => \$ifplugd, type => "bool", disabled => sub { $wireless_roaming } },
- if_($net->{type} eq "lan",
- { text => N("Start at boot"), val => \$onboot, type => "bool" },
- ),
- { label => N("Metric"), val => \$ethntf->{METRIC}, advanced => 1 },
- { text => N("Enable IPv6 to IPv4 tunnel"), val => \$ipv6_tunnel, type => "bool", advanced => 1 },
- if_($auto_ip,
- { label => N("DHCP client"), val => \$ethntf->{DHCP_CLIENT},
- list => \@network::ethernet::dhcp_clients, advanced => 1 },
- { label => N("DHCP timeout (in seconds)"), val => \$ethntf->{DHCP_TIMEOUT}, advanced => 1 },
- { text => N("Get DNS servers from DHCP"), val => \$peerdns, type => "bool", advanced => 1 },
- { text => N("Get YP servers from DHCP"), val => \$peeryp, type => "bool", advanced => 1 },
- { text => N("Get NTPD servers from DHCP"), val => \$peerntpd, type => "bool", advanced => 1 },
- ),
- ];
- },
- complete => sub {
- $ethntf->{BOOTPROTO} = $auto_ip ? "dhcp" : "static";
- return 0 if $auto_ip;
- if (!is_ip($ethntf->{IPADDR})) {
- $in->ask_warn(N("Error"), N("IP address should be in format 1.2.3.4"));
- return 1, 0;
- }
- if (!is_ip($ethntf->{NETMASK})) {
- $in->ask_warn(N("Error"), N("Netmask should be in format 255.255.224.0"));
- return 1, 1;
- }
- if (is_ip_forbidden($ethntf->{IPADDR})) {
- $in->ask_warn(N("Error"), N("Warning: IP address %s is usually reserved!", $ethntf->{IPADDR}));
- return 1, 0;
- }
- #- test if IP address is already used (do not test for sagem DSL devices since it may use many ifcfg files)
- if ($ntf_name ne "sagem" && find { $_->{DEVICE} ne $ethntf->{DEVICE} && $_->{IPADDR} eq $ethntf->{IPADDR} } values %{$net->{ifcfg}}) {
- $in->ask_warn(N("Error"), N("%s already in use\n", $ethntf->{IPADDR}));
- return 1, 0;
- }
- },
- focus_out => sub {
- $ethntf->{NETMASK} ||= netmask($ethntf->{IPADDR}) unless $ethntf->{NETMASK};
- },
- post => sub {
- $ethntf->{ONBOOT} = bool2yesno($onboot);
- $ethntf->{NEEDHOSTNAME} = bool2yesno($needhostname);
- $ethntf->{PEERDNS} = bool2yesno($peerdns);
- $ethntf->{PEERYP} = bool2yesno($peeryp);
- $ethntf->{PEERNTPD} = bool2yesno($peerntpd);
- $ethntf->{MII_NOT_SUPPORTED} = bool2yesno(!$ifplugd);
- $ethntf->{HWADDR} = $track_network_id or delete $ethntf->{HWADDR};
- #- FIXME: special case for sagem where $ethntf->{DEVICE} is the result of a command
- #- we can't always use $ntf_name because of some USB DSL modems
- $net->{net_interface} = $ntf_name eq "sagem" ? "sagem" : $ethntf->{DEVICE};
- $need_network_restart = $ipv6_tunnel ^ text2bool($ethntf->{IPV6TO4INIT});
- if ($ipv6_tunnel) {
- $net->{network}{NETWORKING_IPV6} = "yes";
- $net->{network}{IPV6_DEFAULTDEV} = "tun6to4";
- }
- $ethntf->{IPV6INIT} = bool2yesno($ipv6_tunnel);
- $ethntf->{IPV6TO4INIT} = bool2yesno($ipv6_tunnel);
- if ($auto_ip) {
- #- delete gateway settings if gateway device is invalid or if reconfiguring the gateway interface to dhcp
- $delete_gateway_settings->($ntf_name);
- }
- return "static_hostname";
- },
- },
-
- ndiswrapper_select_driver =>
- {
- pre => sub {
- @ndiswrapper_drivers = network::ndiswrapper::installed_drivers();
- $ndiswrapper_driver ||= first(@ndiswrapper_drivers);
- },
- data => sub {
- [ { label => N("Choose an ndiswrapper driver"), type => "list", val => \$ndiswrapper_driver, allow_empty_list => 1,
- list => [ undef, @ndiswrapper_drivers ],
- format => sub { defined $_[0] ? N("Use the ndiswrapper driver %s", $_[0]) : N("Install a new driver") } } ];
- },
- complete => sub {
- $ndiswrapper_driver ||= network::ndiswrapper::ask_driver($in) or return 1;
- !$ndiswrapper_do_driver_selection->();
- },
- post => $ndiswrapper_next_step,
- },
-
- ndiswrapper_select_device =>
- {
- data => sub {
- [ { label => N("Select a device:"), type => "list", val => \$ndiswrapper_device, allow_empty_list => 1,
- list => [ network::ndiswrapper::present_devices($ndiswrapper_driver) ],
- format => sub { $_[0]{description} } } ];
- },
- complete => sub {
- !$ndiswrapper_do_device_selection->();
+ "configure_control_compat";
},
- post => $ndiswrapper_next_step,
},
- wireless =>
- {
- pre => sub {
- require network::wireless;
- $find_lan_module->();
- $need_rt2x00_iwpriv = network::wireless::is_old_rt2x00($module);
- $wireless_roaming = delete $ethntf->{WIRELESS_MODE} eq 'Roaming' && !$need_rt2x00_iwpriv;
- $ethntf->{WIRELESS_MODE} ||= "Managed";
- $ethntf->{WIRELESS_ESSID} ||= "any";
- ($wireless_enc_key, my $restricted) = network::wireless::get_wep_key_from_iwconfig($ethntf->{WIRELESS_ENC_KEY});
- $wireless_enc_mode =
- $ethntf->{WIRELESS_WPA_DRIVER} || $ethntf->{WIRELESS_IWPRIV} =~ /WPAPSK/ ? 'wpa-psk' :
- !$wireless_enc_key ? 'none' :
- $restricted ? 'restricted' :
- 'open';
- delete $ethntf->{WIRELESS_ENC_KEY};
- delete $ethntf->{WIRELESS_IWPRIV};
- delete $ethntf->{WIRELESS_WPA_DRIVER};
- },
- name => N("Please enter the wireless parameters for this card:"),
- data => sub {
- [
- { label => N("Operating Mode"), val => \$ethntf->{WIRELESS_MODE},
- list => [ N_("Ad-hoc"), N_("Managed"), N_("Master"), N_("Repeater"), N_("Secondary"), N_("Auto") ],
- format => \&translate,
- disabled => sub { $wireless_roaming } },
- { label => N("Network name (ESSID)"), val => \$ethntf->{WIRELESS_ESSID} },
- { label => N("Encryption mode"), val => \$wireless_enc_mode,
- list => [ keys %network::wireless::wireless_enc_modes ],
- sort => 1,
- format => sub { translate($network::wireless::wireless_enc_modes{$_[0]}) } },
- { label => N("Encryption key"), val => \$wireless_enc_key, disabled => sub { $wireless_enc_mode eq 'none' } },
- { text => N("Allow access point roaming"), val => \$wireless_roaming, type => "bool",
- disabled => sub { network::wireless::is_wpa_supplicant_blacklisted($module) } },
- { label => N("Network ID"), val => \$ethntf->{WIRELESS_NWID}, advanced => 1 },
- { label => N("Operating frequency"), val => \$ethntf->{WIRELESS_FREQ}, advanced => 1 },
- { label => N("Sensitivity threshold"), val => \$ethntf->{WIRELESS_SENS}, advanced => 1 },
- { label => N("Bitrate (in b/s)"), val => \$ethntf->{WIRELESS_RATE}, advanced => 1 },
- { label => N("RTS/CTS"), val => \$ethntf->{WIRELESS_RTS}, advanced => 1,
- help => N("RTS/CTS adds a handshake before each packet transmission to make sure that the
-channel is clear. This adds overhead, but increase performance in case of hidden
-nodes or large number of active nodes. This parameter sets the size of the
-smallest packet for which the node sends RTS, a value equal to the maximum
-packet size disable the scheme. You may also set this parameter to auto, fixed
-or off.")
- },
- { label => N("Fragmentation"), val => \$ethntf->{WIRELESS_FRAG}, advanced => 1 },
- { label => N("iwconfig command extra arguments"), val => \$ethntf->{WIRELESS_IWCONFIG}, advanced => 1,
- help => N("Here, one can configure some extra wireless parameters such as:
-ap, channel, commit, enc, power, retry, sens, txpower (nick is already set as the hostname).
-
-See iwconfig(8) man page for further information."),
- },
- { label =>
- #-PO: split the "xyz command extra argument" translated string into two lines if it's bigger than the english one
- N("iwspy command extra arguments"), val => \$ethntf->{WIRELESS_IWSPY}, advanced => 1,
- help => N("iwspy is used to set a list of addresses in a wireless network
-interface and to read back quality of link information for each of those.
-
-This information is the same as the one available in /proc/net/wireless :
-quality of the link, signal strength and noise level.
-
-See iwpspy(8) man page for further information."),
- },
- if_(!$need_rt2x00_iwpriv,
- { label => N("iwpriv command extra arguments"), val => \$ethntf->{WIRELESS_IWPRIV}, advanced => 1,
- help => N("iwpriv enable to set up optionals (private) parameters of a wireless network
-interface.
-
-iwpriv deals with parameters and setting specific to each driver (as opposed to
-iwconfig which deals with generic ones).
-
-In theory, the documentation of each device driver should indicate how to use
-those interface specific commands and their effect.
-
-See iwpriv(8) man page for further information."),
- })
- ];
- },
- complete => sub {
- if ($ethntf->{WIRELESS_FREQ} && $ethntf->{WIRELESS_FREQ} !~ /[0-9.]*[kGM]/) {
- $in->ask_warn(N("Error"), N("Freq should have the suffix k, M or G (for example, \"2.46G\" for 2.46 GHz frequency), or add enough '0' (zeroes)."));
- return 1, 6;
- }
- if ($ethntf->{WIRELESS_RATE} && $ethntf->{WIRELESS_RATE} !~ /[0-9.]*[kGM]/) {
- $in->ask_warn(N("Error"), N("Rate should have the suffix k, M or G (for example, \"11M\" for 11M), or add enough '0' (zeroes)."));
- return 1, 8;
- }
- if (network::wireless::wlan_ng_needed($module)) {
- $in->do_pkgs->ensure_is_installed('prism2-utils', '/sbin/wlanctl-ng') or return 1;
- }
- $need_wpa_supplicant = ($wireless_roaming || $wireless_enc_mode eq 'wpa-psk') && !$need_rt2x00_iwpriv;
- if ($need_wpa_supplicant) {
- $in->do_pkgs->ensure_is_installed('wpa_supplicant', '/usr/sbin/wpa_supplicant') or return 1;
- }
- !network::thirdparty::setup_device($in, 'wireless', $module);
- },
- post => sub {
- if ($wireless_roaming) {
- $ethntf->{MII_NOT_SUPPORTED} = 'no';
- $ethntf->{WIRELESS_MODE} = 'Roaming';
- } elsif (member($wireless_enc_mode, qw(open restricted))) {
- $ethntf->{WIRELESS_ENC_KEY} = network::wireless::convert_wep_key_for_iwconfig($wireless_enc_key, $wireless_enc_mode eq 'restricted');
- } elsif ($need_rt2x00_iwpriv) {
- #- use iwpriv for WPA with rt2400/rt2500 drivers, they don't plan to support wpa_supplicant
- $ethntf->{WIRELESS_IWPRIV} = $wireless_enc_mode eq 'wpa-psk' && qq(set AuthMode=WPAPSK
-set EncrypType=TKIP
-set SSID=$ethntf->{WIRELESS_ESSID}
-set WPAPSK="$wireless_enc_key"
-set TxRate=0);
- }
-
- if ($need_wpa_supplicant) {
- $ethntf->{WIRELESS_WPA_DRIVER} = network::wireless::wpa_supplicant_get_driver($module);
- network::wireless::wpa_supplicant_add_network($ethntf->{WIRELESS_ESSID}, $wireless_enc_mode, $wireless_enc_key);
- }
-
- if (network::wireless::wlan_ng_needed($module)) {
- network::wireless::wlan_ng_configure($ethntf->{WIRELESS_ESSID}, $wireless_enc_key, $ethntf->{DEVICE}, $module);
- }
- return "lan_protocol";
- },
+ configure_control_compat => {
+ pre => sub {
+ $connection_compat = $net->{type}->new($connection || {});
+ network::connection::guess_control_settings($connection_compat);
+ $control_settings = network::connection::get_control_settings($connection_compat);
+ },
+ name => sub { N("Connection control") },
+ data => sub { $control_settings },
+ post => sub {
+ $net->{ifcfg}{$net->{net_interface}}{USERCTL} = bool2yesno($connection_compat->{control}{userctl});
+ $net->{ifcfg}{$net->{net_interface}}{ONBOOT} = bool2yesno($connection_compat->{control}{onboot});
+ network::network::configure_network($net, $in, $modules_conf);
+ "ask_connect_now";
+ },
},
-
- dvb =>
- {
- name => N("DVB configuration") . "\n\n" . N("Select the network interface to configure:"),
- data => [ { label => N("DVB Adapter"), type => "list", val => \$dvb_adapter, allow_empty_list => 1,
- list => [ modules::probe_category("multimedia/dvb") ], format => sub { $_[0]{description} } } ],
- next => "dvb_adapter",
- },
-
-
- dvb_adapter =>
- {
- pre => sub {
- my $previous_ethntf = find { $is_dvb_interface->($_) } values %{$net->{ifcfg}};
- $dvb_ad = $previous_ethntf->{DVB_ADAPTER_ID};
- $dvb_net = $previous_ethntf->{DVB_NETWORK_DEMUX};
- $dvb_pid = $previous_ethntf->{DVB_NETWORK_PID};
- if (my $device = find { sysopen(undef, $_, c::O_RDWR() | c::O_NONBLOCK()) } glob("/dev/dvb/adapter*/net*")) {
- ($dvb_ad, $dvb_net) = $device =~ m,/dev/dvb/adapter(\d+)/net(\d+),;
- }
- },
- name => N("DVB adapter settings"),
- data => sub {
- [
- { label => N("Adapter card"), val => \$dvb_ad },
- { label => N("Net demux"), val => \$dvb_net },
- { label => N("PID"), val => \$dvb_pid },
- ];
- },
- post => sub {
- $ntf_name = 'dvb' . $dvb_ad . '_' . $dvb_net;
- $ethntf = $net->{ifcfg}{$ntf_name} ||= {};
- $ethntf->{DEVICE} = $ntf_name;
- $ethntf->{DVB_ADAPTER_ID} = qq("$dvb_ad");
- $ethntf->{DVB_NETWORK_DEMUX} = qq("$dvb_net");
- $ethntf->{DVB_NETWORK_PID} = qq("$dvb_pid");
- return "lan_protocol";
- },
- },
-
- static_hostname =>
- {
- pre => sub {
- if ($ethntf->{IPADDR}) {
- $net->{resolv}{dnsServer} ||= dns($ethntf->{IPADDR});
- $gateway_ex = gateway($ethntf->{IPADDR});
- # $net->{network}{GATEWAY} ||= gateway($ethntf->{IPADDR});
- if ($ntf_name eq "sagem") {
- my @sagem_ip = split(/\./, $ethntf->{IPADDR});
- $sagem_ip[3] = 254;
- $net->{network}{GATEWAY} = join(".", @sagem_ip);
- }
- }
- },
- name => N("Please enter your host name.
-Your host name should be a fully-qualified host name,
-such as ``mybox.mylab.myco.com''.
-You may also enter the IP address of the gateway if you have one.") .
- " " . # better looking text (to be merged into texts since some languages (eg: ja) doesn't need it
-N("Last but not least you can also type in your DNS server IP addresses."),
- data => sub {
- [ { label => $auto_ip ? N("Host name (optional)") : N("Host name"), val => \$net->{network}{HOSTNAME} },
- if_(!$auto_ip,
- { label => N("DNS server 1"), val => \$net->{resolv}{dnsServer} },
- { label => N("DNS server 2"), val => \$net->{resolv}{dnsServer2} },
- { label => N("DNS server 3"), val => \$net->{resolv}{dnsServer3} },
- { label => N("Search domain"), val => \$net->{resolv}{DOMAINNAME},
- help => N("By default search domain will be set from the fully-qualified host name") },
- { label => N("Gateway (e.g. %s)", $gateway_ex), val => \$net->{network}{GATEWAY} },
- if_(@all_cards > 1,
- { label => N("Gateway device"), val => \$net->{network}{GATEWAYDEV}, list => [ N_("None"), sort keys %all_eth_intf ],
- format => sub { $all_eth_intf{$_[0]} || translate($_[0]) } },
- ),
- ),
- ];
- },
- complete => sub {
- foreach my $dns (qw(dnsServer dnsServer2 dnsServer3)) {
- if ($net->{resolv}{$dns} && !is_ip($net->{resolv}{$dns})) {
- $in->ask_warn(N("Error"), N("DNS server address should be in format 1.2.3.4"));
- return 1;
- }
- }
- if ($net->{network}{GATEWAY} && !is_ip($net->{network}{GATEWAY})) {
- $in->ask_warn(N("Error"), N("Gateway address should be in format 1.2.3.4"));
- return 1;
- }
- },
- post => sub {
- $net->{network}{GATEWAYDEV} eq "None" and delete $net->{network}{GATEWAYDEV};
- return "zeroconf";
- }
- },
-
-
- zeroconf =>
- {
- name => N("If desired, enter a Zeroconf hostname.
-This is the name your machine will use to advertise any of
-its shared resources that are not managed by the network.
-It is not necessary on most networks."),
- data => [ { label => N("Zeroconf Host name"), val => \$net->{zeroconf}{hostname} } ],
- complete => sub {
- if ($net->{zeroconf}{hostname} =~ /\./) {
- $in->ask_warn(N("Error"), N("Zeroconf host name must not contain a ."));
- return 1;
- }
- },
- next => "allow_user_ctl",
- },
-
-
- allow_user_ctl =>
- {
- name => N("Do you want to allow users to start the connection?"),
- type => "yesorno",
- default => sub { bool2yesno(text2bool($net->{ifcfg}{$net->{net_interface}}{USERCTL})) },
- post => sub {
- my ($res) = @_;
- $net->{ifcfg}{$net->{net_interface}}{USERCTL} = bool2yesno($res);
- return $goto_start_on_boot_ifneeded->();
- },
- },
-
-
- network_on_boot =>
- {
- name => N("Do you want to start the connection at boot?"),
- type => "yesorno",
- default => sub { ($net->{type} eq 'modem' ? 'no' : 'yes') },
- post => sub {
- my ($res) = @_;
- $net->{ifcfg}{$net->{net_interface}}{ONBOOT} = bool2yesno($res);
- return $after_start_on_boot_step->();
- },
- },
-
-
isdn_dial_on_boot =>
{
pre => sub {
@@ -1327,7 +687,7 @@ It is not necessary on most networks."),
post => sub {
my $method = find { $_->{name} eq $isdn->{dial_method} } @isdn_dial_methods;
$net->{ifcfg}{ippp0}{$_} = bool2yesno($method->{$_}) foreach qw(ONBOOT DIAL_ON_IFUP);
- return $after_start_on_boot_step->();
+ return "configure_control_compat";
},
},
@@ -1343,16 +703,10 @@ It is not necessary on most networks."),
# local $::isWizard = 0;
my $_w = $in->wait_message('', N("Testing your connection..."), 1);
network::tools::stop_net_interface($net, 0);
- if (exists $net->{adsl}{ethernet_device}) {
- network::tools::stop_interface($net->{adsl}{ethernet_device}, 0);
- sleep 1;
- network::tools::start_interface($net->{adsl}{ethernet_device}, 0);
- }
sleep 1;
network::tools::start_net_interface($net, 1);
my $s = 30;
$type =~ /modem/ and $s = 50;
- $type =~ /adsl/ and $s = 35;
$type =~ /isdn/ and $s = 20;
sleep $s;
$up = network::tools::connected();
@@ -1398,11 +752,30 @@ Test your connection via net_monitor or mcc. If your connection does not work, y
#- keeping the translations in case someone want to restore these texts
if_(0,
+ N("Alcatel speedtouch USB modem"),
+ N("Sagem USB modem"),
+ N("Bewan modem"),
+ N("Bewan modem"),
+ N("ECI Hi-Focus modem"), # this one needs eci agreement
+ N("LAN connection"),
+ N("Wireless connection"),
+ N("ADSL connection"),
+ N("Cable connection"),
+ N("ISDN connection"),
+ N("Modem connection"),
+ N("DVB connection"),
# keep b/c of translations in case they can be reused somewhere else:
N("(detected on port %s)", 'toto'),
#-PO: here, "(detected)" string will be appended to eg "ADSL connection"
N("(detected %s)", 'toto'), N("(detected)"),
N("Network Configuration"),
+ N("Zeroconf hostname resolution"),
+ N("If desired, enter a Zeroconf hostname.
+This is the name your machine will use to advertise any of
+its shared resources that are not managed by the network.
+It is not necessary on most networks."),
+ N("Zeroconf Host name"),
+ N("Zeroconf host name must not contain a ."),
N("Because you are doing a network installation, your network is already configured.
Click on Ok to keep your configuration, or cancel to reconfigure your Internet & Network connection.
"),
@@ -1412,6 +785,18 @@ Click on Ok to keep your configuration, or cancel to reconfigure your Internet &
N("Configuration is complete, do you want to apply settings?"),
N("You have configured multiple ways to connect to the Internet.\nChoose the one you want to use.\n\n"),
N("Internet connection"),
+ N("Select the network interface to configure:"),
+ N("Configuring network device %s (driver %s)", '', ''),
+ N("The following protocols can be used to configure a LAN connection. Please choose the one you want to use."),
+ N("Please enter your host name.
+Your host name should be a fully-qualified host name,
+such as ``mybox.mylab.myco.com''.
+You may also enter the IP address of the gateway if you have one."),
+ # better looking text (to be merged into texts since some languages (eg: ja) doesn't need it
+ N("Last but not least you can also type in your DNS server IP addresses."),
+ N("DNS server address should be in format 1.2.3.4"),
+ N("Gateway address should be in format 1.2.3.4"),
+ N("Gateway device"),
);
}
@@ -1429,33 +814,20 @@ sub safe_main {
}
}
-sub start_internet {
- my ($o) = @_;
- #- give a chance for module to be loaded using kernel-BOOT modules...
- #- FIXME, this has nothing to do there
- $::isStandalone or modules::load_category($o->{modules_conf}, 'network/*');
- network::tools::start_net_interface($o->{net}, 1);
-}
-
-sub stop_internet {
- my ($o) = @_;
- network::tools::stop_net_interface($o->{net}, 1);
-}
-
1;
=head1 network::netconnect::detect()
=head2 example of usage
-use lib qw(/usr/lib/libDrakX);
-use network::netconnect;
-use modules;
-use Data::Dumper;
+ use lib qw(/usr/lib/libDrakX);
+ use network::netconnect;
+ use modules;
+ use Data::Dumper;
-my %i;
-my $modules_conf = modules::any_conf->read;
-network::netconnect::detect($modules_conf, \%i);
-print Dumper(\%i),"\n";
+ my %i;
+ my $modules_conf = modules::any_conf->read;
+ network::netconnect::detect($modules_conf, \%i);
+ print Dumper(\%i),"\n";
=cut
class="hl ipl">%s\" nên có nguồn hdlist hoặc synthesis hợp lệ, phương tiện " "bị bỏ qua" #: ../urpm.pm:1067 #, c-format msgid "copying description file of \"%s\"..." msgstr "đang sao chép tập tin mô tả của \"%s\"..." #: ../urpm.pm:1091 ../urpm.pm:1365 #, c-format msgid "computing md5sum of existing source hdlist (or synthesis)" msgstr "tính toán md5sum của hdlist nguồn hiện có (hoặc tổng hợp)" #: ../urpm.pm:1102 ../urpm.pm:1376 #, c-format msgid "examining MD5SUM file" msgstr "đang kiểm tra tập tin MD5SUM" #: ../urpm.pm:1156 #, c-format msgid "copying source hdlist (or synthesis) of \"%s\"..." msgstr "đang sao chép hdlist nguồn (hoặc tổng hợp) của \"%s\"..." #: ../urpm.pm:1169 #, c-format msgid "copy of [%s] failed (file is suspiciously small)" msgstr "lỗi sao chép [%s] (có lẽ tập tin nhỏ)" #: ../urpm.pm:1174 #, c-format msgid "computing md5sum of copied source hdlist (or synthesis)" msgstr "tính toán md5sum của hdlist nguồn được sao chép (hoặc tổng hợp)" #: ../urpm.pm:1176 #, c-format msgid "copy of [%s] failed (md5sum mismatch)" msgstr "Lỗi bản sao của [%s] (md5sum không so khớp)" #: ../urpm.pm:1197 ../urpm.pm:1413 ../urpm.pm:1747 #, c-format msgid "problem reading synthesis file of medium \"%s\"" msgstr "trục trặc khi đọc tập tin tổng hợp của phương tiện \"%s\"" #: ../urpm.pm:1239 #, c-format msgid "reading rpm files from [%s]" msgstr "đang đọc các tập tin rpm từ [%s]" #: ../urpm.pm:1264 #, c-format msgid "unable to read rpm files from [%s]: %s" msgstr "không thể đọc các tập tin rpm từ [%s]: %s" #: ../urpm.pm:1269 #, c-format msgid "no rpm files found from [%s]" msgstr "không tìm thấy các tập tin rpm từ [%s]" #: ../urpm.pm:1431 #, c-format msgid "retrieving source hdlist (or synthesis) of \"%s\"..." msgstr "đang thu thập hdlist nguồn (hoặc tổng hợp) của \"%s\"..." #: ../urpm.pm:1458 #, c-format msgid "found probed hdlist (or synthesis) as %s" msgstr "đã thấy hdlist được dò tìm (hoặc tổng hợp) là %s" #: ../urpm.pm:1504 #, c-format msgid "computing md5sum of retrieved source hdlist (or synthesis)" msgstr "tính toán md5sum của hdlist nguồn thu thập được (hoặc tổng hợp)" #: ../urpm.pm:1506 #, c-format msgid "md5sum mismatch" msgstr "md5sum không khớp" #: ../urpm.pm:1602 #, c-format msgid "retrieval of source hdlist (or synthesis) failed" msgstr "không thu thập được hdlist nguồn (hoặc tổng hợp)" #: ../urpm.pm:1609 #, c-format msgid "no hdlist file found for medium \"%s\"" msgstr "không tìm thấy tập tin hdlist cho phương tiện \"%s\"" #: ../urpm.pm:1620 ../urpm.pm:1674 #, c-format msgid "file [%s] already used in the same medium \"%s\"" msgstr "tập tin [%s] đang được dùng trong cùng phương tiện \"%s\" rồi" #: ../urpm.pm:1660 #, c-format msgid "unable to parse hdlist file of \"%s\"" msgstr "không thể phân tích tập tin hdlist của \"%s\"" #: ../urpm.pm:1697 #, c-format msgid "unable to write list file of \"%s\"" msgstr "không thể ghi tập danh sách của \"%s\"" #: ../urpm.pm:1704 #, c-format msgid "writing list file for medium \"%s\"" msgstr "đang ghi tập tin danh sách cho phương tiện \"%s\"" #: ../urpm.pm:1706 #, c-format msgid "nothing written in list file for \"%s\"" msgstr "không có gì được ghi trong tập tin danh sách cho \"%s\"" #: ../urpm.pm:1721 #, c-format msgid "examining pubkey file of \"%s\"..." msgstr "đang kiểm tra tập tin pubkey của \"%s\"..." #: ../urpm.pm:1728 #, c-format msgid "...imported key %s from pubkey file of \"%s\"" msgstr "...đã nhập key %s từ tập tin pubkey của \"%s\"" #: ../urpm.pm:1731 #, c-format msgid "unable to import pubkey file of \"%s\"" msgstr "không thể nhập tập tin pubkey của \"%s\"" #: ../urpm.pm:1797 #, c-format msgid "reading headers from medium \"%s\"" msgstr "đang đọc các header từ phương tiện \"%s\"" #: ../urpm.pm:1802 #, c-format msgid "building hdlist [%s]" msgstr "xây dựng hdlist [%s]" #: ../urpm.pm:1814 ../urpm.pm:1843 ../urpmi:355 #, c-format msgid "built hdlist synthesis file for medium \"%s\"" msgstr "xây dựng tập tin tổng hợp hdlist cho phương tiện \"%s\"" #: ../urpm.pm:1863 #, c-format msgid "found %d headers in cache" msgstr "tìm thấy các header %d trong cache" #: ../urpm.pm:1867 #, c-format msgid "removing %d obsolete headers in cache" msgstr "đang gỡ bỏ các header cũ %d trong cache" #: ../urpm.pm:1917 #, c-format msgid "mounting %s" msgstr "gắn kết %s" #: ../urpm.pm:1933 #, c-format msgid "unmounting %s" msgstr "thôi gắn kết %s" #: ../urpm.pm:1955 #, c-format msgid "relocated %s entries in depslist" msgstr "các mục nhập %s được đặt lại trong danh sách các phụ thuộc" #: ../urpm.pm:1956 #, c-format msgid "no entries relocated in depslist" msgstr "không có các mục nhập được đặt lại trong danh sách các phụ thuộc" #: ../urpm.pm:1969 #, c-format msgid "invalid rpm file name [%s]" msgstr "tên tập tin rpm [%s] không hợp lệ" #: ../urpm.pm:1975 #, c-format msgid "retrieving rpm file [%s] ..." msgstr "đang thu thập tập tin rpm [%s] ..." #: ../urpm.pm:1982 ../urpm.pm:2831 #, c-format msgid "unable to access rpm file [%s]" msgstr "không thể truy cập tập tin rpm [%s]" #: ../urpm.pm:1987 #, c-format msgid "unable to register rpm file" msgstr "không thể đăng ký tập tin rpm" #: ../urpm.pm:1990 #, c-format msgid "error registering local packages" msgstr "lỗi đăng ký các gói tin cục bộ" #: ../urpm.pm:2098 #, c-format msgid "no package named %s" msgstr "không có gói tin với tên %s" #: ../urpm.pm:2101 ../urpme:88 #, c-format msgid "The following packages contain %s: %s" msgstr "Các gói tin sau đây chứa %s: %s" #: ../urpm.pm:2284 ../urpm.pm:2328 ../urpm.pm:2354 #, c-format msgid "there are multiple packages with the same rpm filename \"%s\"" msgstr "có nhiều gói với cùng tên tập tin rpm \"%s\"" #: ../urpm.pm:2339 #, c-format msgid "unable to correctly parse [%s] on value \"%s\"" msgstr "không thể phân tích đúng [%s] trên giá trị \"%s\"" #: ../urpm.pm:2366 #, c-format msgid "" "medium \"%s\" uses an invalid list file:\n" " mirror is probably not up-to-date, trying to use alternate method" msgstr "" "phương tiện \"%s\" dùng tập tin danh sách không hợp lệ:\n" " có thể mirror không được cập nhật, đang thử dùng phương pháp thay thế khác" #: ../urpm.pm:2370 #, c-format msgid "medium \"%s\" does not define any location for rpm files" msgstr "phương tiện \"%s\" không chỉ ra bất kỳ vị trí nào cho các tập tin rpm" #: ../urpm.pm:2382 #, c-format msgid "package %s is not found." msgstr "Không tìm thấy gói tin %s." #: ../urpm.pm:2422 ../urpm.pm:2437 ../urpm.pm:2461 ../urpm.pm:2476 #, c-format msgid "urpmi database locked" msgstr "cơ sở dữ liệu urpmi bị khóa" #: ../urpm.pm:2528 ../urpm.pm:2531 ../urpm.pm:2561 #, c-format msgid "medium \"%s\" is not selected" msgstr "phương tiện \"%s\" không được chọn" #: ../urpm.pm:2557 #, c-format msgid "unable to read rpm file [%s] from medium \"%s\"" msgstr "không thể đọc tập tin rpm [%s] từ phương tiện \"%s\"" #: ../urpm.pm:2565 #, c-format msgid "incoherent medium \"%s\" marked removable but not really" msgstr "" "phương tiện không rõ ràng \"%s\" được đánh dấu là tháo lắp nhưng không phải " "vậy" #: ../urpm.pm:2577 #, c-format msgid "unable to access medium \"%s\"" msgstr "không thể truy cập phương tiện \"%s\"" #: ../urpm.pm:2639 #, c-format msgid "malformed input: [%s]" msgstr "input bất thường: [%s]" #: ../urpm.pm:2646 #, c-format msgid "retrieving rpm files from medium \"%s\"..." msgstr "đang thu thập các tập tin rpm từ phương tiện \"%s\"..." #: ../urpm.pm:2728 ../urpmi:700 #, c-format msgid "Preparing..." msgstr "Đang chuẩn bị..." #: ../urpm.pm:2762 #, c-format msgid "using process %d for executing transaction" msgstr "dùng tiến trình %d để thực thi phiên giao dịch" #: ../urpm.pm:2793 #, c-format msgid "" "created transaction for installing on %s (remove=%d, install=%d, upgrade=%d)" msgstr "" "đã tạo phiên giao dịch cho việc cài đặt trên %s (gỡ bỏ=%d, cài đặt=%d, nâng " "cấp=%d)" #: ../urpm.pm:2796 #, c-format msgid "unable to create transaction" msgstr "không thể tạo phiên giao dịch" #: ../urpm.pm:2803 #, c-format msgid "removing package %s" msgstr "gỡ bỏ gói %s" #: ../urpm.pm:2805 #, c-format msgid "unable to remove package %s" msgstr "không thể gỡ bỏ gói %s" #: ../urpm.pm:2815 #, c-format msgid "adding package %s (id=%d, eid=%d, update=%d, file=%s)" msgstr "thêm gói %s (id=%d, eid=%d, cập nhật=%d, tập tin=%s)" #: ../urpm.pm:2818 #, c-format msgid "unable to install package %s" msgstr "không thể cài đặt gói %s" #: ../urpm.pm:2880 #, c-format msgid "More information on package %s" msgstr "Thêm thông tin cho gói %s" #: ../urpm.pm:3038 ../urpm.pm:3071 #, c-format msgid "due to missing %s" msgstr "do thiếu %s" #: ../urpm.pm:3039 ../urpm.pm:3069 #, c-format msgid "due to unsatisfied %s" msgstr "vì không thỏa mãn %s" #: ../urpm.pm:3040 #, c-format msgid "trying to promote %s" msgstr "thử xúc tiến %s" #: ../urpm.pm:3041 #, c-format msgid "in order to keep %s" msgstr "để giữ %s" #: ../urpm.pm:3064 #, c-format msgid "in order to install %s" msgstr "để cài đặt %s" #: ../urpm.pm:3076 #, c-format msgid "due to conflicts with %s" msgstr "vì xung đột với %s" #: ../urpm.pm:3078 #, c-format msgid "unrequested" msgstr "thôi yêu cầu" #: ../urpm.pm:3094 #, c-format msgid "Invalid signature (%s)" msgstr "Chữ ký không hợp lệ (%s)" #: ../urpm.pm:3126 #, c-format msgid "Invalid Key ID (%s)" msgstr "Key ID không hợp lệ (%s)" #: ../urpm.pm:3128 #, c-format msgid "Missing signature (%s)" msgstr "Thiếu chữ ký (%s)" #: ../urpm/args.pm:88 ../urpm/args.pm:95 #, c-format msgid "bad proxy declaration on command line\n" msgstr "khai báo proxy sai trong dòng lệnh\n" #: ../urpm/args.pm:226 #, c-format msgid "urpmq: cannot read rpm file \"%s\"\n" msgstr "urpmq: không thể đọc tập tin rpm \"%s\"\n" #: ../urpm/msg.pm:80 #, c-format msgid "Sorry, bad choice, try again\n" msgstr "Xin lỗi, lựa chọn sai, hãy thử lại\n" #: ../urpme:36 #, c-format msgid "" "urpme version %s\n" "Copyright (C) 1999-2004 Mandrakesoft.\n" "This is free software and may be redistributed under the terms of the GNU " "GPL.\n" "\n" "usage:\n" msgstr "" "Phiên bản urpme %s\n" "Bản quyền (C) 1999-2004 Mandrakesoft.\n" "Đây là phần mềm miễn phí và có thể phân phối lại theo các điều khoản của GNU " "GPL.\n" "\n" "Cách dùng:\n" #: ../urpme:41 ../urpmf:32 ../urpmi:74 ../urpmi.addmedia:47 #: ../urpmi.removemedia:41 ../urpmi.update:30 ../urpmq:43 #, c-format msgid " --help - print this help message.\n" msgstr " --help - in thông tin trợ giúp này.\n" #: ../urpme:42 ../urpmi:80 #, c-format msgid " --auto - automatically select a package in choices.\n" msgstr " --auto - tự động chọn một gói tin trong các gói.\n" #: ../urpme:43 ../urpmi:121 #, c-format msgid "" " --test - verify if the installation can be achieved correctly.\n" msgstr " --test - xác minh nếu việc cài đặt đạt kết quả tốt.\n" #: ../urpme:44 ../urpmi:94 ../urpmq:63 #, c-format msgid "" " --force - force invocation even if some packages do not exist.\n" msgstr "" " --force - ép buộc cầu viện ngay cả khi một số gói tin không tồn " "tại.\n" #: ../urpme:45 ../urpmi:99 ../urpmq:64 #, c-format msgid " --parallel - distributed urpmi across machines of alias.\n" msgstr " --parallel - phân phối urpmi qua các máy của alias.\n" #: ../urpme:46 ../urpmi:100 #, c-format msgid " --root - use another root for rpm installation.\n" msgstr " --root - dùng root khác để thực hiện cài đặt rpm.\n" #: ../urpme:47 #, c-format msgid "" " --use-distrib - configure urpmi on the fly from a distrib tree, useful\n" " to (un)install a chroot with --root option.\n" msgstr "" " --use-distrib - cấu hình nhanh chóng urpmi từ một distrib tree, giúp\n" " cài đặt/bỏ cài đặt một chroot bằng tùy chọn --root.\n" #: ../urpme:49 ../urpmi:133 ../urpmi.addmedia:78 ../urpmi.removemedia:46 #: ../urpmi.update:45 ../urpmq:76 #, c-format msgid " -v - verbose mode.\n" msgstr " -v - chế độ verbose.\n" #: ../urpme:50 #, c-format msgid " -a - select all packages matching expression.\n" msgstr " -a - chọn toàn bộ các gói tin khớp với sự diễn đạt.\n" #: ../urpme:83 #, c-format msgid "unknown packages" msgstr "các gói tin không xác định " #: ../urpme:83 #, c-format msgid "unknown package" msgstr "gói tin không xác định" #: ../urpme:93 #, c-format msgid "removing package %s will break your system" msgstr "việc gỡ bỏ gói tin %s sẽ phá vỡ hệ thống" #: ../urpme:95 #, c-format msgid "Nothing to remove" msgstr "Không có gì để gỡ bỏ" #: ../urpme:99 #, c-format msgid "Checking to remove the following packages" msgstr "Đang kiểm tra để gỡ bỏ các gói tin sau đây" #: ../urpme:106 #, c-format msgid "To satisfy dependencies, the following packages will be removed (%d MB)" msgstr "Để thỏa mãn các phụ thuộc, các gói sau đây sẽ được gỡ bỏ (%d MB)" #: ../urpme:108 ../urpmi:481 ../urpmi:646 #, c-format msgid " (y/N) " msgstr " (Có/Không) " #: ../urpme:111 ../urpmi:689 #, c-format msgid "removing %s" msgstr "gỡ bỏ %s" #: ../urpme:115 #, c-format msgid "Removing failed" msgstr "Gỡ bỏ không được" #: ../urpmf:27 #, c-format msgid "" "urpmf version %s\n" "Copyright (C) 2002-2004 Mandrakesoft.\n" "This is free software and may be redistributed under the terms of the GNU " "GPL.\n" "\n" "usage:\n" msgstr "" "Phiên bản urpmf %s\n" "Bản quyền (C) 2002-2004 Mandrakesoft.\n" "Đây là phần mềm miễn phí và có thể phân phối lại theo các điều khoản của GNU " "GPL.\n" "\n" "Cách dùng:\n" #: ../urpmf:33 ../urpmi:75 ../urpmq:44 #, c-format msgid " --update - use only update media.\n" msgstr " --update - chỉ dùng phương tiện cập nhật.\n" #: ../urpmf:34 ../urpmi:76 ../urpmq:45 #, c-format msgid " --media - use only the given media, separated by comma.\n" msgstr "" " --media - chỉ dùng phương tiện được trao, ngăn cách bởi dấu phẩy.\n" #: ../urpmf:35 ../urpmi:77 ../urpmq:46 #, c-format msgid " --excludemedia - do not use the given media, separated by comma.\n" msgstr "" " --excludemedia - không dùng phương tiện được trao, ngăn cách bởi dấu " "phẩy.\n" #: ../urpmf:36 ../urpmi:78 ../urpmq:47 #, c-format msgid "" " --sortmedia - sort media according to substrings separated by comma.\n" msgstr "" " --sortmedia - xếp loại phương tiện theo các chuỗi con được ngăn " "cách bởi dấu phẩy.\n" #: ../urpmf:37 ../urpmq:48 #, c-format msgid " --synthesis - use the synthesis given instead of urpmi db.\n" msgstr "" " --synthesis - dùng tổng hợp (synthesis) nhận được để thay cho urpmi " "db.\n" #: ../urpmf:38 #, c-format msgid " --verbose - verbose mode.\n" msgstr " --verbose - phương thức verbose.\n" #: ../urpmf:39 #, c-format msgid "" " --quiet - do not print tag name (default if no tag given on " "command\n" " line, incompatible with interactive mode).\n" msgstr "" " --quiet - không in ra tên tag (mặc định nếu không đưa tag vào\n" " dòng lệnh, không tương thích với chế độ tương tác).\n" #: ../urpmf:41 #, c-format msgid " --uniq - do not print identical lines.\n" msgstr " --uniq - không in ra các dòng giống nhau.\n" #: ../urpmf:42 #, c-format msgid " --all - print all tags.\n" msgstr " --all - in ra toàn bộ tag.\n" #: ../urpmf:43 #, c-format msgid " --name - print only package names.\n" msgstr " --name - chỉ in ra tên gói.\n" #: ../urpmf:44 #, c-format msgid " --group - print tag group: group.\n" msgstr " --group - in ra nhóm tag: nhóm.\n" #: ../urpmf:45 #, c-format msgid " --size - print tag size: size.\n" msgstr " --size - in ra kích thước tag: kích thước.\n" #: ../urpmf:46 #, c-format msgid " --epoch - print tag epoch: epoch.\n" msgstr " --epoch - in ra tag epoch: epoch.\n" #: ../urpmf:47 #, c-format msgid " --summary - print tag summary: summary.\n" msgstr " --summary - in ra tóm tắt tag: tóm tắt.\n" #: ../urpmf:48 #, c-format msgid " --description - print tag description: description.\n" msgstr " --description - in ra mô tả tag: mô tả.\n" #: ../urpmf:49 #, c-format msgid " --sourcerpm - print tag sourcerpm: source rpm.\n" msgstr " --sourcerpm - in ra tag sourcerpm: source rpm.\n" #: ../urpmf:50 #, c-format msgid " --packager - print tag packager: packager.\n" msgstr " --packager - in ra tag packager: packager.\n" #: ../urpmf:51 #, c-format msgid " --buildhost - print tag buildhost: build host.\n" msgstr " --buildhost - in ra tag buildhost: build host.\n" #: ../urpmf:52 #, c-format msgid " --url - print tag url: url.\n" msgstr " --url - in ra tag url: url.\n" #: ../urpmf:53 #, c-format msgid " --provides - print tag provides: all provides.\n" msgstr " --provides - in ra cung cấp tag: toàn bộ các cung cấp.\n" #: ../urpmf:54 #, c-format msgid " --requires - print tag requires: all requires.\n" msgstr " --requires - in ra yêu cầu tag: toàn bộ các yêu cầu.\n" #: ../urpmf:55 #, c-format msgid " --files - print tag files: all files.\n" msgstr " --files - in ra tập tin tag: toàn bộ các tập tin.\n" #: ../urpmf:56 #, c-format msgid " --conflicts - print tag conflicts: all conflicts.\n" msgstr " --conflicts - in ra xung đột tag: toàn bộ các xung đột.\n" #: ../urpmf:57 #, c-format msgid " --obsoletes - print tag obsoletes: all obsoletes.\n" msgstr " --obsoletes - in ra các dòng tag: toàn bộ dòng.\n" #: ../urpmf:58 ../urpmi:114 ../urpmq:73 #, c-format msgid "" " --env - use specific environment (typically a bug\n" " report).\n" msgstr "" " --env - dùng môi trường riêng (điển hình là báo cáo\n" " lỗi).\n" #: ../urpmf:60 #, c-format msgid " -i - ignore case distinctions in every pattern.\n" msgstr " -i - bỏ qua các dấu hiệu phân biệt trong mọi mẫu.\n" #: ../urpmf:61 ../urpmq:90 #, c-format msgid " -f - print version, release and arch with name.\n" msgstr " -f - in phiên bản, phát hành và arch với tên.\n" #: ../urpmf:62 #, c-format msgid " -e - include perl code directly as perl -e.\n" msgstr " -e - bao gồm mã perl trực tiếp như perl -e.\n" #: ../urpmf:63 #, c-format msgid "" " -a - binary AND operator, true if both expression are true.\n" msgstr "" " -a - binary AND operator, đúng nếu cả hai expression là đúng.\n" #: ../urpmf:64 #, c-format msgid "" " -o - binary OR operator, true if one expression is true.\n" msgstr "" " -o - binary OR operator, đúng nếu một expression là đúng.\n" #: ../urpmf:65 #, c-format msgid " ! - unary NOT, true if expression is false.\n" msgstr " ! - unary NOT, đúng nếu expression là sai.\n" #: ../urpmf:66 #, c-format msgid " ( - left parenthesis to open group expression.\n" msgstr " ( - dấu ngoặc trái để mở group expression.\n" #: ../urpmf:67 #, c-format msgid " ) - right parenthesis to close group expression.\n" msgstr " ) - dấu ngoặc phải để đóng group expression.\n" #: ../urpmf:115 #, c-format msgid "" "callback is :\n" "%s\n" msgstr "" "callback là :\n" "%s\n" #: ../urpmf:120 ../urpmi:249 ../urpmq:113 #, c-format msgid "using specific environment on %s\n" msgstr "đang dùng môi trường đặc hiệu trên %s\n" #: ../urpmf:151 #, c-format msgid "" "Note: since no media searched uses hdlists, urpmf was unable to return any " "result\n" msgstr "" "Lưu ý: vì không có phương tiện được tìm kiếm dùng hdlists, urpmf không thể " "trả lại kết quả\n" #: ../urpmf:152 #, c-format msgid "You may want to use --name to search for package names.\n" msgstr "Bạn có thể muốn dùng --name để tìm tên gói tin.\n" #: ../urpmi:69 #, c-format msgid "" "urpmi version %s\n" "Copyright (C) 1999-2004 Mandrakesoft.\n" "This is free software and may be redistributed under the terms of the GNU " "GPL.\n" "\n" "usage:\n" msgstr "" "Phiên bản urpmi %s\n" "Bản quyền (C) 1999-2004 Mandrakesoft.\n" "Đây là phần mềm miễn phí và có thể phân phối lại theo các điều khoản của GNU " "GPL.\n" "\n" "Cách dùng:\n" #: ../urpmi:79 #, c-format msgid " --synthesis - use the given synthesis instead of urpmi db.\n" msgstr " --synthesis - dùng synthesis nhận được thay cho urpmi db.\n" #: ../urpmi:81 ../urpmq:49 #, c-format msgid "" " --auto-select - automatically select packages to upgrade the system.\n" msgstr " --auto-select - tự động chọn các gói tin để nâng cấp hệ thống.\n" #: ../urpmi:82 #, c-format msgid "" " --no-uninstall - never ask to uninstall a package, abort the " "installation.\n" msgstr "" " --no-uninstall - không bao giờ đề nghị gỡ cài đặt một gói, huỷ bỏ việc cài " "đặt.\n" #: ../urpmi:83 ../urpmq:51 #, c-format msgid "" " --keep - keep existing packages if possible, reject requested\n" " packages that leads to remove.\n" msgstr "" " --keep - giữ gói đang tồn tại nếu có thể, bỏ các gói yêu cầu\n" " dẫn đến việc gỡ bỏ.\n" #: ../urpmi:85 #, c-format msgid "" " --split-level - split in small transaction if more than given packages\n" " are going to be installed or upgraded,\n" " default is %d.\n" msgstr "" " --split-level - tách làm phiên giao dịch nhỏ nếu có nhiều hơn các gói " "được\n" " có sẽ được cài đặt hay nâng cấp,\n" " mặc định là %d.\n" #: ../urpmi:88 #, c-format msgid " --split-length - small transaction length, default is %d.\n" msgstr " --split-length - độ dài phiên giao dịch nhỏ, mặc định là %d.\n" #: ../urpmi:89 ../urpmq:50 #, c-format msgid " --fuzzy - impose fuzzy search (same as -y).\n" msgstr " --fuzzy - tác động tìm kiếm fuzzy (giống như -y).\n" #: ../urpmi:90 ../urpmq:59 #, c-format msgid " --src - next package is a source package (same as -s).\n" msgstr " --src - gói tin tiếp theo là gói nguồn (giống như -s).\n" #: ../urpmi:91 #, c-format msgid " --install-src - install only source package (no binaries).\n" msgstr " --install-src - chỉ cài đặt gói nguồn (không cài gói nhị phân).\n" #: ../urpmi:92 #, c-format msgid " --clean - remove rpm from cache before anything else.\n" msgstr " --clean - gỡ bỏ rpm khỏi cache trước tiên.\n" #: ../urpmi:93 #, c-format msgid " --noclean - keep rpm not used in cache.\n" msgstr " --noclean - giữ rpm không được dùng trong cache.\n" #: ../urpmi:95 #, c-format msgid "" " --allow-nodeps - allow asking user to install packages without\n" " dependencies checking.\n" msgstr "" " --allow-nodeps - cho phép hỏi người dùng cài đặt các gói tin\n" " mà không kiểm tra các phụ thuộc.\n" #: ../urpmi:97 #, c-format msgid "" " --allow-force - allow asking user to install packages without\n" " dependencies checking and integrity.\n" msgstr "" " --allow-force - cho phép hỏi người dùng cài đặt các gói tin mà\n" " không kiểm tra các phụ thuộc và tính toàn vẹn.\n" #: ../urpmi:101 #, c-format msgid "" " --use-distrib - configure urpmi on the fly from a distrib tree, useful\n" " to install a chroot with --root option.\n" msgstr "" " --use-distrib - cấu hình nhanh chóng urpmi từ một distrib tree, giúp\n" " cài đặt chroot bằng tùy chọn --root.\n" #: ../urpmi:103 ../urpmi.addmedia:48 ../urpmi.update:31 ../urpmq:67 #, c-format msgid " --wget - use wget to retrieve distant files.\n" msgstr " --wget - dùng wget để thu thập các tập tin ở xa.\n" #: ../urpmi:104 ../urpmi.addmedia:49 ../urpmi.update:32 ../urpmq:68 #, c-format msgid " --curl - use curl to retrieve distant files.\n" msgstr " --curl - dùng curl để thu thập các tập tin ở xa.\n" #: ../urpmi:105 ../urpmi.addmedia:50 ../urpmi.update:33 #, c-format msgid " --limit-rate - limit the download speed.\n" msgstr " --limit-rate - giới hạn tốc độ tải xuống.\n" #: ../urpmi:106 #, c-format msgid "" " --resume - resume transfer of partially-downloaded files\n" " (--no-resume disables it, default is disabled).\n" msgstr "" " --resume - tiếp tục truyền tải lại các tập tin đang tải về dở dang\n" " (--no-resume lài không tiếp tục lại, mặc định là không).\n" #: ../urpmi:108 ../urpmi.addmedia:51 ../urpmi.update:34 ../urpmq:69 #, c-format msgid "" " --proxy - use specified HTTP proxy, the port number is assumed\n" " to be 1080 by default (format is <proxyhost[:port]>).\n" msgstr "" " --proxy - dùng chỉ định HTTP proxy, số hiệu port được gán\n" " là 1080 theo mặc định (định dạng là <proxyhost[:port]" ">).\n" #: ../urpmi:110 ../urpmi.addmedia:53 ../urpmi.update:36 ../urpmq:71 #, c-format msgid "" " --proxy-user - specify user and password to use for proxy\n" " authentication (format is <user:password>).\n" msgstr "" " --proxy-user - chỉ định người dùng và mật khẩu cho proxy\n" " xác thực (khuôn dạng là <user:password>).\n" #: ../urpmi:112 #, c-format msgid "" " --bug - output a bug report in directory indicated by\n" " next arg.\n" msgstr "" " --bug - xuất ra báo cáo lỗi trong thư mục được chỉ định\n" " bởi đối số (arg) tiếp theo.\n" #: ../urpmi:116 #, c-format msgid " --X - use X interface.\n" msgstr " --X - dùng giao diện X.\n" #: ../urpmi:117 #, c-format msgid "" " --best-output - choose best interface according to the environment:\n" " X or text mode.\n" msgstr "" " --best-output - hãy chọn giao diện tốt nhất theo môi trường:\n" " chế độ X hay văn bản.\n" #: ../urpmi:119 #, c-format msgid "" " --verify-rpm - verify rpm signature before installation\n" " (--no-verify-rpm disable it, default is enabled).\n" msgstr "" " --verify-rpm - xác minh chữ ký rpm trước khi cài đặt.\n" " (--no-verify-rpm để tắt nó, mặc định là bật).\n" #: ../urpmi:122 #, c-format msgid " --excludepath - exclude path separated by comma.\n" msgstr " --excludepath - gồm đường dẫn được tách biệt bằng dấu phẩy.\n" #: ../urpmi:123 #, c-format msgid " --excludedocs - exclude docs files.\n" msgstr " --excludedocs - trừ các tập tin tài liệu.\n" #: ../urpmi:124 #, c-format msgid " --skip - packages which installation should be skipped\n" msgstr " --skip - các gói tin cài đặt nên được bỏ qua\n" #: ../urpmi:125 #, c-format msgid "" " --more-choices - when several packages are found, propose more choices\n" " than the default.\n" msgstr "" " --more-choices - khi tìm thấy vài gói tin, đề xuất thêm lựa chọn so với\n" " mặc định.\n" #: ../urpmi:127 ../urpmq:79 #, c-format msgid " -a - select all matches on command line.\n" msgstr " -a - chọn toàn bộ các tương hợp trong dòng lệnh.\n" #: ../urpmi:128 #, c-format msgid " -p - allow search in provides to find package.\n" msgstr " -p - cho phép tìm gói tin trong số các nhà cung cấp.\n" #: ../urpmi:129 #, c-format msgid " -P - do not search in provides to find package.\n" msgstr " -P - không tìm các nhà cung cấp để kiếm gói tin.\n" #: ../urpmi:130 ../urpmq:84 #, c-format msgid " -y - impose fuzzy search (same as --fuzzy).\n" msgstr " -y - tác động tìm kiếm fuzzy (giống như --fuzzy.\n" #: ../urpmi:131 ../urpmq:86 #, c-format msgid " -s - next package is a source package (same as --src).\n" msgstr " -s - gói tin tiếp theo kà gói nguồn (giống như --src).\n" #: ../urpmi:132 ../urpmi.addmedia:77 ../urpmi.removemedia:45 #: ../urpmi.update:44 #, c-format msgid " -q - quiet mode.\n" msgstr " -q - chế độ yên lặng.\n" #: ../urpmi:134 #, c-format msgid " names or rpm files given on command line will be installed.\n" msgstr " tên hay tập tin rpm có trong dòng lệnh sẽ được cài đặt.\n" #: ../urpmi:141 #, c-format msgid "Choose location to save file" msgstr "Chọn nơi lưu tập tin" #: ../urpmi:197 #, c-format msgid "What can be done with binary rpm files when using --install-src" msgstr "Cái có thể được làm bằng các tập tin nhị phân khi dùng --install-src" #: ../urpmi:204 #, c-format msgid "" "You have selected a source package:\n" "\n" "%s\n" "\n" "You probably didn't want to install it on your computer (installing it\n" "would allow you to make modifications to its sourcecode then compile it).\n" "\n" "What would you like to do?" msgstr "" "Bạn đã chọn gói nguồn:\n" "\n" "%s\n" "\n" "Có thể bạn đã không muốn cài đặt nó lên hệ thống (cài đặt nó\n" "sẽ cho phép bạn thay đổi mã nguồn rồi biên dịch lại).\n" "\n" "Bạn muốn làm gì?" #: ../urpmi:212 #, c-format msgid "Do nothing" msgstr "Không làm gì cả" #: ../urpmi:213 #, c-format msgid "Yes, really install it" msgstr "Có muốn cài đặt" #: ../urpmi:214 ../urpmi:231 #, c-format msgid "Save file" msgstr "Lưu tập tin" #: ../urpmi:225 #, c-format msgid "" "You are about to install the following software package on your computer:\n" "\n" "%s\n" "\n" "You may prefer to just save it. What is your choice?" msgstr "" "Bạn sắp cài đặt các gói phần mềm sau đây vào hệ thống:\n" "\n" "%s\n" "\n" "Bạn có thể chỉ muốn lưu nó. Bạn chọn làm việc gì?" #: ../urpmi:230 #, c-format msgid "Install it" msgstr "Cài đặt gói tin" #: ../urpmi:239 #, c-format msgid "" "Directory [%s] already exists, please use another directory for bug report " "or delete it" msgstr "" "Thư mục [%s] đã tồn tại rồi, hãy dùng thư mục khác để ghi báo cáo lỗi hoặc " "xóa thư mục đó đi" #: ../urpmi:240 #, c-format msgid "Unable to create directory [%s] for bug report" msgstr "Không thể tạo thư mục [%s] cho báo cáo lỗi" #: ../urpmi:243 ../urpmi:365 #, c-format msgid "Copying failed" msgstr "Sao chép không được" #: ../urpmi:260 #, c-format msgid "Only superuser is allowed to install packages" msgstr "Chỉ cho phép người dùng cao cấp được cài đặt các gói" #: ../urpmi:401 #, c-format msgid "One of the following packages is needed:" msgstr "Cần một gói trong các gói tin sau đây:" #: ../urpmi:408 #, c-format msgid "What is your choice? (1-%d) " msgstr "Bạn lựa chọn gì? (1-%d) " #: ../urpmi:417 ../urpmi:544 #, c-format msgid "Package installation..." msgstr "Cài đặt gói..." #: ../urpmi:417 ../urpmi:544 #, c-format msgid "Initializing..." msgstr "Đang khởi tạo..." #: ../urpmi:440 #, c-format msgid "" "Some package requested cannot be installed:\n" "%s" msgstr "" "Không thể cài đặt một số gói tin được yêu cầu:\n" "%s" #: ../urpmi:445 ../urpmi:476 #, c-format msgid "do you agree ?" msgstr "Đồng ý không ?" #: ../urpmi:451 #, c-format msgid "" "\n" "Continue?" msgstr "" "\n" "Tiếp tục?" #: ../urpmi:465 #, c-format msgid "" "The installation cannot continue because the following packages\n" "have to be removed for others to be upgraded:\n" "%s\n" msgstr "" "Không thể tiếp tục việc cài đặt vì các gói sau đây phải được gỡ bỏ\n" "để nâng cấp các gói khác:\n" "%s\n" #: ../urpmi:471 #, c-format msgid "" "The following packages have to be removed for others to be upgraded:\n" "%s" msgstr "" "Các gói sau đây phải được gỡ bỏ để nâng cấp các gói khác:\n" "%s" #: ../urpmi:510 ../urpmi:521 #, c-format msgid "" "To satisfy dependencies, the following %d packages are going to be installed " "(%d MB)" msgstr "Để thỏa mãn các phụ thuộc, %d gói sau đây sẽ được cài đặt (%d MB)" #: ../urpmi:511 ../urpmi:522 #, c-format msgid "" "To satisfy dependencies, the following package is going to be installed (%d " "MB)" msgstr "Để thỏa mãn phụ thuộc, gói tin sau đây sẽ được cài đặt (%d MB)" #: ../urpmi:517 #, c-format msgid "" "You need to be root to install the following dependencies:\n" "%s\n" msgstr "" "Bạn phải là root để cài đặt các phụ thuộc sau đây:\n" "%s\n" #: ../urpmi:540 ../urpmq:300 #, c-format msgid "unable to get source packages, aborting" msgstr "không thể lấy các gói nguồn, hủy bỏ" #: ../urpmi:554 #, c-format msgid "Please insert the medium named \"%s\" on device [%s]" msgstr "Hãy nạp phương tiện có tên \"%s\" trên thiết bị [%s]" #: ../urpmi:555 #, c-format msgid "Press Enter when ready..." msgstr "Nhấn Enter khi sẵn sàng ..." #: ../urpmi:599 #, c-format msgid "Downloading package `%s'..." msgstr "Đang tải về gói `%s'..." #: ../urpmi:611 #, c-format msgid " %s%% of %s completed, ETA = %s, speed = %s" msgstr " %s%% của %s đã hoàn thành, ETA = %s, tốc độ = %s" #: ../urpmi:614 #, c-format msgid " %s%% completed, speed = %s" msgstr " %s%% đã hoàn thành, tốc độ = %s" #: ../urpmi:633 #, c-format msgid "The following packages have bad signatures" msgstr "Các gói tin sau đây có các chữ ký tồi" #: ../urpmi:634 #, c-format msgid "Do you want to continue installation ?" msgstr "Bạn muốn tiếp tục cài đặt không ?" #: ../urpmi:654 ../urpmi:781 #, c-format msgid "" "Installation failed, some files are missing:\n" "%s\n" "You may want to update your urpmi database" msgstr "" "Cài đặt lỗi, thiếu một số tập tin:\n" "%s\n" "Có thể bạn nên cập nhật cơ sở dữ liệu của urpmi." #: ../urpmi:664 ../urpmi:719 ../urpmi:740 ../urpmi:760 #, c-format msgid "Installation failed" msgstr "Cài đặt không được" #: ../urpmi:679 #, c-format msgid "distributing %s" msgstr "phân phối %s" #: ../urpmi:687 #, c-format msgid "installing %s" msgstr "đang cài đặt %s" #: ../urpmi:702 #, c-format msgid "Installing package `%s' (%s/%s)..." msgstr "Đang cài đặt gói `%s' (%s/%s)..." #: ../urpmi:726 #, c-format msgid "Try installation without checking dependencies? (y/N) " msgstr "Thử cài đặt mà không cần kiểm tra các phụ thuộc? (Có/Không)" #: ../urpmi:745 #, c-format msgid "Try installation even more strongly (--force)? (y/N) " msgstr "Thử cố gắng cài đặt (--force)? (Có/[Không])" #: ../urpmi:786 #, c-format msgid "%d installation transactions failed" msgstr "%d phiên giao dịch cài đặt lỗi" #: ../urpmi:794 #, c-format msgid "Installation is possible" msgstr "Có khả năng cài đặt" #: ../urpmi:797 #, c-format msgid "Everything already installed" msgstr "Mọi thứ đã được cài đặt rồi" #: ../urpmi:811 #, c-format msgid "restarting urpmi" msgstr "khởi chạy lại urpmi" #: ../urpmi.addmedia:38 #, c-format msgid "" "usage: urpmi.addmedia [options] <name> <url> [with <relative_path>]\n" "where <url> is one of\n" " [file:/]/<path> with <relative filename of hdlist>\n" " ftp://<login>:<password>@<host>/<path> with <relative filename of " "hdlist>\n" " ftp://<host>/<path> with <relative filename of hdlist>\n" " http://<host>/<path> with <relative filename of hdlist>\n" " removable://<path>\n" "\n" "and [options] are from\n" msgstr "" "cách dùng: urpmi.addmedia [tùy chọn] <tên> <url> [with <đường dẫn_liên " "quan>]\n" "nơi mà <url> là một trong\n" " [file:/]/<đường dẫn> with <tên tệp tin liên quan của hdlist>\n" " ftp://<đăng nhập>:<mật khẩu>@<máy chủ>/<đường dẫn> with <tên tệp tin " "của hdlist>\n" " ftp://<máy chủ>/<đường dẫn> with <tên tệp tin liên quan của hdlist>\n" " http://<máy chủ/<đường dẫn> with <tên tệp tin liên quan của hdlist>\n" " removable://<đường dẫn>\n" "\n" "và [tùy chọn] là từ\n" #: ../urpmi.addmedia:55 #, c-format msgid " --update - create an update medium.\n" msgstr " --update - tạo phương tiện cập nhật.\n" #: ../urpmi.addmedia:56 #, c-format msgid " --probe-synthesis - try to find and use synthesis file.\n" msgstr " --probe-synthesis - thử tìm và sử dụng tập tin synthesis.\n" #: ../urpmi.addmedia:57 #, c-format msgid " --probe-hdlist - try to find and use hdlist file.\n" msgstr " --probe-hdlist - thử tìm và sử dụng tập tin hdlist.\n" #: ../urpmi.addmedia:58 #, c-format msgid "" " --no-probe - do not try to find any synthesis or\n" " hdlist file.\n" msgstr "" " --no-probe - không thử tìm bất kỳ tập tin hdlist hoặc\n" " synthesis.\n" #: ../urpmi.addmedia:60 #, c-format msgid "" " --distrib - automatically create all media from an installation\n" " medium.\n" msgstr "" " --distrib - tự động tạo mọi phương tiện từ một phương tiện cài\n" " đặt.\n" #: ../urpmi.addmedia:62 #, c-format msgid "" " --distrib-XXX - automatically create a medium for XXX part of a\n" " distribution, XXX may be main, contrib, updates or\n" " anything else that has been configured ;-)\n" msgstr "" " --distrib-XXX - tự động tạo phương tiện cho phần XXX của phân\n" " phối, XXX có thể là chính, phân phối, cập nhật haybất kỳ\n" " cái gì khác đã được cấu hình ;-)\n" #: ../urpmi.addmedia:65 #, c-format msgid "" " --from - use specified url for list of mirrors, the default is\n" " %s\n" msgstr "" " --from - dùng url chỉ định cho danh sách các mirror, mặc định là\n" " %s\n" #: ../urpmi.addmedia:67 #, c-format msgid "" " --version - use specified distribution version, the default is taken\n" " from the version of the distribution told by the\n" " installed mandrakelinux-release package.\n" msgstr "" " --version - dùng phiên bản được chỉ định, mặc định được lấy từ\n" " phiên bản của phân phối được nói bởi gói phát hành\n" " Mandrakelinux đã cài đặt.\n" #: ../urpmi.addmedia:70 #, c-format msgid "" " --arch - use specified architecture, the default is arch of\n"