diff options
-rw-r--r-- | perl-install/ChangeLog | 2 | ||||
-rw-r--r-- | perl-install/install2.pm | 15 |
2 files changed, 10 insertions, 7 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog index 9b5d770b3..e83423b33 100644 --- a/perl-install/ChangeLog +++ b/perl-install/ChangeLog @@ -4,6 +4,8 @@ upgrade the same way it is done for installation. added check of minimal size, abort else (at least let the user know about :-) fixed crypto if no network interface available. + * install2.pm: fixed problem during upgrade that lost network + configuration. 2000-04-28 Pixel <pixel@mandrakesoft.com> diff --git a/perl-install/install2.pm b/perl-install/install2.pm index fd9cfc9dc..a69b02e3e 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -48,7 +48,7 @@ my (%installSteps, @orderedInstallSteps); miscellaneous => [ __("Miscellaneous"), 1, 1, '$::beginner' ], partitionDisks => [ __("Setup filesystems"), 1, 0, '', "selectInstallClass" ], formatPartitions => [ __("Format partitions"), 1, -1, '', "partitionDisks" ], - choosePackages => [ __("Choose packages to install"), 1, 1, '$::beginner', "formatPartitions" ], + choosePackages => [ __("Choose packages to install"), 1, -2, '$::beginner', "formatPartitions" ], doInstallStep => [ __("Install system"), 1, -1, '', ["formatPartitions", "selectInstallClass"] ], configureNetwork => [ __("Configure networking"), 1, 1, '$::beginner && !$::corporate', "formatPartitions" ], installCrypto => [ __("Cryptographic"), 1, 1, '!$::expert', "configureNetwork" ], @@ -399,18 +399,19 @@ sub miscellaneous { #------------------------------------------------------------------------------ sub configureNetwork { - my ($clicked) = @_; - - if ($o->{isUpgrade} && !$clicked) { - $o->{netc} or $o->{netc} = {}; + #- get current configuration of network device. + eval { + $o->{netc} ||= {}; $o->{intf} ||= []; add2hash($o->{netc}, network::read_conf("$o->{prefix}/etc/sysconfig/network")) if -r "$o->{prefix}/etc/sysconfig/network"; add2hash($o->{netc}, network::read_resolv_conf("$o->{prefix}/etc/resolv.conf")) if -r "$o->{prefix}/etc/resolv.conf"; foreach (all("$o->{prefix}/etc/sysconfig/network-scripts")) { if (/ifcfg-(\w+)/ && $1 !~ /^ppp/) { - push @{$o->{intf}}, { getVarsFromSh("$o->{prefix}/etc/sysconfig/network-scripts/$_") }; + my $intf = network::findIntf($o->{intf}, $1); + add2hash($intf, { getVarsFromSh("$o->{prefix}/etc/sysconfig/network-scripts/$_") }); } } - } + }; + $o->configureNetwork($_[1] == 1); } #------------------------------------------------------------------------------ |