summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-03-23 17:38:01 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-03-23 17:38:01 +0000
commitaf403ee1a8c3e7a1c0f38273255e5c14dec0d1f5 (patch)
tree2dc7003a66584a7ec4f5ec2677a31f0705f5a9da /perl-install/network
parent8363d05c00ebef0fc9f69a40066539f5d7274b49 (diff)
downloaddrakx-af403ee1a8c3e7a1c0f38273255e5c14dec0d1f5.tar
drakx-af403ee1a8c3e7a1c0f38273255e5c14dec0d1f5.tar.gz
drakx-af403ee1a8c3e7a1c0f38273255e5c14dec0d1f5.tar.bz2
drakx-af403ee1a8c3e7a1c0f38273255e5c14dec0d1f5.tar.xz
drakx-af403ee1a8c3e7a1c0f38273255e5c14dec0d1f5.zip
fix drakconnect config writing when there's only one configured
interface (eg: at install time) (#8998)
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/netconnect.pm17
1 files changed, 10 insertions, 7 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index 9117a04ce..264aa6925 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -199,6 +199,14 @@ sub real_main {
return "network_on_boot";
};
+ my $save_cnx = sub {
+ if (keys %$config) {
+ require Data::Dumper;
+ output("$::prefix/etc/sysconfig/drakconnect", Data::Dumper->Dump([ $config ], [ '$p' ]));
+ }
+ return $goto_start_on_boot_ifneeded->();
+ };
+
my $handle_multiple_cnx = sub {
$need_restart_network = 1 if $netcnx->{type} =~ /adsl|cable|lan/;
my $nb = keys %{$netc->{internet_cnx}};
@@ -206,6 +214,7 @@ sub real_main {
return "multiple_internet_cnx";
} else {
$netc->{internet_cnx_choice} = (keys %{$netc->{internet_cnx}})[0] if $nb == 1;
+ $save_cnx->();
return $goto_start_on_boot_ifneeded->()
}
};
@@ -1130,13 +1139,7 @@ N("Last but not least you can also type in your DNS server IP addresses."),
[ { label => N("Internet connection"), val => \$netc->{internet_cnx_choice},
list => [ keys %{$netc->{internet_cnx}} ] } ];
},
- post => sub {
- if (keys %$config) {
- require Data::Dumper;
- output("$::prefix/etc/sysconfig/drakconnect", Data::Dumper->Dump([ $config ], [ '$p' ]));
- }
- return $goto_start_on_boot_ifneeded->();
- },
+ post => $save_cnx,
},
apply_settings =>