From 0ed259c5a608e956c9ccfac2845413a6e688d11f Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 30 Aug 1999 22:32:42 +0000 Subject: no_comment --- perl-install/install2.pm | 11 ++++++++--- perl-install/install_any.pm | 8 +++++--- perl-install/install_steps_interactive.pm | 15 ++++++++------- perl-install/network.pm | 3 ++- 4 files changed, 23 insertions(+), 14 deletions(-) (limited to 'perl-install') diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 7937251b5..78262ff35 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -165,7 +165,8 @@ my @installSteps = ( selectLanguage => [ __("Choose your language"), 1, 1 ], selectPath => [ __("Choose install or upgrade"), 0, 0 ], selectInstallClass => [ __("Select installation class"), 1, 1, "selectPath" ], - setupModules => [ __("Setup SCSI"), 1, 0 ], + selectKeyboard => [ __("Choose your keyboard"), 1, 1 ], + setupSCSI => [ __("Setup SCSI"), 1, 0 ], partitionDisks => [ __("Setup filesystems"), 1, 0 ], formatPartitions => [ __("Format partitions"), 1, -1, "partitionDisks" ], choosePackages => [ __("Choose packages to install"), 1, 1, "selectInstallClass" ], @@ -251,12 +252,16 @@ sub selectLanguage { keyboard::write($o->{prefix}, $o->{keyboard}); } } 'doInstallStep'; - - goto &selectKeyboard if $_[0]; } sub selectKeyboard { + return if $o->{installClass} eq "beginner" && !$_[0]; + $o->{keyboard} = keyboard::setup($o->chooseKeyboard); + + addToBeDone { + keyboard::write($o->{prefix}, $o->{keyboard}) unless $o->{isUpgrade}; + } 'doInstallStep'; } sub selectPath { diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 70568a512..06779960b 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -84,8 +84,10 @@ sub shells($) { sub setPackages { my ($o) = @_; - eval { $o->{packages} = pkgs::psUsingHdlist() } if $o->{method} ne "nfs"; - $o->{packages} = pkgs::psUsingDirectory() if $o->{method} eq "nfs" || $@; + my $useHdlist = $o->{method} !~ /nfs|hd/; + eval { $o->{packages} = pkgs::psUsingHdlist() } if $useHdlist; + $o->{packages} = pkgs::psUsingDirectory() if !$useHdlist || $@; + pkgs::getDeps($o->{packages}); $o->{compss} = pkgs::readCompss($o->{packages}); @@ -106,7 +108,7 @@ sub addToBeDone(&$) { sub getTimeZones { local *F; - open F, "cd /usr/share/zoneinfo && find [A-Z]* -type f |"; + open F, "cd $::o->{prefix}/usr/share/zoneinfo && find [A-Z]* -type f |"; my @l = sort map { chop; $_ } ; close F or die "cannot list the available zoneinfos"; @l; diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 126673c22..2a37a4f0d 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -10,6 +10,7 @@ use vars qw(@ISA); use common qw(:common); use partition_table qw(:types); use install_steps; +use install_any; use detect_devices; use network; use modules; @@ -137,19 +138,19 @@ sub configureNetwork($) { $o->{netc}{NETWORKING} = "false"; } elsif ($r !~ /^Keep/) { my @l = network::getNet() or return die _("no network card found"); - @l = ($l[0]) unless $::expert; # keep only one - my $last; foreach (@l) { + my $last; foreach ($::expert ? @l : $l[0]) { my $intf = network::findIntf($o->{intf}, $_); add2hash($intf, $last); + add2hash($intf, { NETMASK => '255.255.255.0' }); $o->configureNetworkIntf($intf); $last = $intf; } - { - my $wait = $o->wait_message(_("Hostname"), _("Determining host name and domain...")); - network::guessHostname($o->{prefix}, $o->{netc}, $o->{intf}); - } - $o->configureNetworkNet($o->{netc} ||= {}); +# { +# my $wait = $o->wait_message(_("Hostname"), _("Determining host name and domain...")); +# network::guessHostname($o->{prefix}, $o->{netc}, $o->{intf}); +# } + $o->configureNetworkNet($o->{netc} ||= {}, @l); } $o->SUPER::configureNetwork; } diff --git a/perl-install/network.pm b/perl-install/network.pm index 15a4cbb02..ca4a66f80 100644 --- a/perl-install/network.pm +++ b/perl-install/network.pm @@ -16,6 +16,7 @@ use log; sub read_conf { my ($file) = @_; my %netc = getVarsFromSh($file); + $netc->{dnsServer} = $netc->{NS0}; \%netc; } @@ -129,7 +130,7 @@ sub sethostname { sub dnsServers { my ($netc) = @_; - map { $netc->{$_} } qw(dnsServer dnsServer2 dnsServer3); + grep { $_ } map { $netc->{$_} } qw(dnsServer dnsServer2 dnsServer3); } sub getNet() { -- cgit v1.2.1