diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-05-12 11:47:17 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-05-12 11:47:17 +0000 |
commit | dde7379145737062ece168593b07f11a78cb535b (patch) | |
tree | 115189e9c70f5efa80a7a5090c7ad5b3bff455af /lib/network/netconnect.pm | |
parent | 642b4a7deb55d9f208d136df997bb2bfa1386502 (diff) | |
download | drakx-net-dde7379145737062ece168593b07f11a78cb535b.tar drakx-net-dde7379145737062ece168593b07f11a78cb535b.tar.gz drakx-net-dde7379145737062ece168593b07f11a78cb535b.tar.bz2 drakx-net-dde7379145737062ece168593b07f11a78cb535b.tar.xz drakx-net-dde7379145737062ece168593b07f11a78cb535b.zip |
allow skipping interface choice if AUTOMATIC_IFACE_CHOICE is true in /etc/sysconfig/drakx-net and only one "automatic" interface is detected (i.e. not ndiswrapper)
Diffstat (limited to 'lib/network/netconnect.pm')
-rw-r--r-- | lib/network/netconnect.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/network/netconnect.pm b/lib/network/netconnect.pm index 607c115..3e90865 100644 --- a/lib/network/netconnect.pm +++ b/lib/network/netconnect.pm @@ -62,6 +62,9 @@ sub real_main { my $db_path = "/usr/share/apps/kppp/Provider"; my (%countries, @isp, $country, $provider, $old_provider); + my $system_file = '/etc/sysconfig/drakx-net'; + my %global_settings = getVarsFromSh($system_file); + my $_w = N("Protocol for the rest of the world"); my %isdn_protocols = ( 2 => N("European protocol (EDSS1)"), @@ -136,7 +139,7 @@ sub real_main { if (exists $steps_compat{$net->{type}}) { return $steps_compat{$net->{type}}; } - @connections_list = $net->{type}->get_connections; + @connections_list = $net->{type}->get_connections(automatic_only => text2bool($global_settings{AUTOMATIC_IFACE_CHOICE})); @connections_list ? "select_connection" : "no_connection"; }, }, @@ -144,7 +147,7 @@ sub real_main { 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_label }, allow_empty_list => 1 } ], + format => sub { $_[0] && $_[0]->get_description }, allow_empty_list => !text2bool($global_settings{AUTOMATIC_IFACE_CHOICE})} ], complete => sub { $connection->setup_thirdparty($in) or return 1; $connection->prepare_device; |