summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-05-12 12:29:49 +0000
committerOlivier Blin <oblin@mandriva.com>2008-05-12 12:29:49 +0000
commit412ac22309ffcc97f701116df3810f8f727a6ec5 (patch)
treee09e0993c9dd6c22dce8da944df6903ede904bd7
parent963d65ea1471f599a11803e730fa738e2878e611 (diff)
downloaddrakx-net-412ac22309ffcc97f701116df3810f8f727a6ec5.tar
drakx-net-412ac22309ffcc97f701116df3810f8f727a6ec5.tar.gz
drakx-net-412ac22309ffcc97f701116df3810f8f727a6ec5.tar.bz2
drakx-net-412ac22309ffcc97f701116df3810f8f727a6ec5.tar.xz
drakx-net-412ac22309ffcc97f701116df3810f8f727a6ec5.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)
-rw-r--r--lib/network/netconnect.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/network/netconnect.pm b/lib/network/netconnect.pm
index dc50da6..92c0ca1 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_description }, 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;