summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2009-03-17 13:30:47 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2009-03-17 13:30:47 +0000
commitceb0403ab456ebaa192031871b2cb56b04f755ab (patch)
tree85e26bbc73a3747e519ad232c1c62f4d0a3d71c9 /bin
parentf93efe33d62719f50f184453f3015832544f8182 (diff)
downloaddrakx-net-ceb0403ab456ebaa192031871b2cb56b04f755ab.tar
drakx-net-ceb0403ab456ebaa192031871b2cb56b04f755ab.tar.gz
drakx-net-ceb0403ab456ebaa192031871b2cb56b04f755ab.tar.bz2
drakx-net-ceb0403ab456ebaa192031871b2cb56b04f755ab.tar.xz
drakx-net-ceb0403ab456ebaa192031871b2cb56b04f755ab.zip
Netprofile: selecting correct netprofile for cloning (#26562 #26776 #29303 #29271 #31721).
Diffstat (limited to 'bin')
-rwxr-xr-xbin/draknetprofile9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/draknetprofile b/bin/draknetprofile
index 45438a0..13ceabc 100755
--- a/bin/draknetprofile
+++ b/bin/draknetprofile
@@ -86,6 +86,15 @@ $profiles_list->get_selection->signal_connect('changed' => sub {
sub get_selected_profile() {
my ($index) = $profiles_list->get_selected_indices;
+ if (not $index ) {
+ my $pc = @{$profiles_list->{data}};
+ my $index = 0;
+ for (my $i = 0; $i < $pc; $i++) {
+ if ( $profiles_list->{data}[$i][0] == 1 ) {
+ $index = $i;
+ }
+ }
+ };
defined $index && $profiles_list->{data}[$index][1];
}