From 1ebf6242bfbbe356cb8cb0e61395ba675afc0e75 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 27 Apr 2000 22:16:23 +0000 Subject: no_comment --- perl-install/ChangeLog | 14 ++++++++++++++ perl-install/any.pm | 4 ++-- perl-install/install2.pm | 18 +++++++++--------- perl-install/install_any.pm | 15 ++++++++++----- perl-install/install_steps.pm | 12 +++++++----- perl-install/install_steps_gtk.pm | 7 +++---- 6 files changed, 45 insertions(+), 25 deletions(-) diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog index eee377c26..93ded5e20 100644 --- a/perl-install/ChangeLog +++ b/perl-install/ChangeLog @@ -1,5 +1,19 @@ +2000-04-28 Pixel + + * install_any.pm (getHds): changed the mount point setting for + windows partitions as device_windobe is not unique + 2000-04-27 Pixel + * install_steps_gtk.pm (create_steps_window): changed to adapt to + new hidden format + + * install2.pm (@installSteps): changed the way hidden is handled. + Now it is a true perl expression (great power now) + + * install_steps_gtk.pm (selectInstallClass1): update steps window + before asking normal/devel/server. Nicer! + * install_steps_interactive.pm (configureNetwork): when "Cancel" pressed at network interface configuration do not skip all configuration. diff --git a/perl-install/any.pm b/perl-install/any.pm index bfd8fc9ad..bd7098285 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -90,7 +90,7 @@ _("Restrict command line options") => { val => \$b->{restricted}, type => "bool" @l = @l[0..3] unless $::expert; $b->{vga} ||= 'Normal'; - $in->ask_from_entries_refH('', _("LILO main options"), \@l, + $in->ask_from_entries_refH('', _("Bootloader main options"), \@l, complete => sub { #- $security > 4 && length($b->{password}) < 6 and $in->ask_warn('', _("At this level of security, a password (and a good one) in lilo is requested")), return 1; $b->{restricted} && !$b->{password} and $in->ask_warn('', _("Option ``Restrict command line options'' is of no use without a password")), return 1; @@ -104,7 +104,7 @@ _("Restrict command line options") => { val => \$b->{restricted}, type => "bool" until ($::beginner && $more <= 1) { $in->set_help('setupBootloaderAddEntry') unless $::isStandalone; my $c = $in->ask_from_list_([''], -_("Here are the following entries in LILO. +_("Here are the different entries. You can add some more or change the existing ones."), [ (sort @{[map { "$_->{label} ($_->{kernel_or_dev})" . ($b->{default} eq $_->{label} && " *") } @{$b->{entries}}]}), __("Add"), __("Done") ], ); diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 68bb0b591..940675c23 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -43,17 +43,17 @@ my (%installSteps, @orderedInstallSteps); selectLanguage => [ __("Choose your language"), 1, 1, '' ], selectInstallClass => [ __("Select installation class"), 1, 1, '' ], setupSCSI => [ __("Hard drive detection"), 1, 0, '' ], - selectMouse => [ __("Configure mouse"), 1, 1, 'beginner', "selectInstallClass" ], + selectMouse => [ __("Configure mouse"), 1, 1, '$::beginner', "selectInstallClass" ], selectKeyboard => [ __("Choose your keyboard"), 1, 1, '', "selectInstallClass" ], - miscellaneous => [ __("Miscellaneous"), 1, 1, 'beginner' ], + 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', "selectInstallClass" ], + choosePackages => [ __("Choose packages to install"), 1, 1, '$::beginner', "formatPartitions" ], doInstallStep => [ __("Install system"), 1, -1, '', ["formatPartitions", "selectInstallClass"] ], - configureNetwork => [ __("Configure networking"), 1, 1, 'beginner', "formatPartitions" ], - installCrypto => [ __("Cryptographic"), 1, 1, '!expert', "configureNetwork" ], + configureNetwork => [ __("Configure networking"), 1, 1, '$::beginner && !$::corporate', "formatPartitions" ], + installCrypto => [ __("Cryptographic"), 1, 1, '!$::expert', "configureNetwork" ], configureTimezone => [ __("Configure timezone"), 1, 1, '', "doInstallStep" ], - configureServices => [ __("Configure services"), 1, 1, '!expert', "doInstallStep" ], + configureServices => [ __("Configure services"), 1, 1, '!$::expert', "doInstallStep" ], configurePrinter => [ __("Configure printer"), 1, 0, '', "doInstallStep" ], setRootPassword => [ __("Set root password"), 1, 1, '', "formatPartitions" ], addUser => [ __("Add a user"), 1, 1, '' ], @@ -62,8 +62,8 @@ arch() !~ /alpha/ ? ( ) : (), setupBootloader => [ __("Install bootloader"), 1, 1, '', "doInstallStep" ], configureX => [ __("Configure X"), 1, 1, '', ["formatPartitions", "setupBootloader"] ], - generateAutoInstFloppy => [ __("Auto install floppy"), 1, 1, '!corporate !expert', "doInstallStep" ], - exitInstall => [ __("Exit install"), 0, 0, 'beginner' ], + generateAutoInstFloppy => [ __("Auto install floppy"), 1, 1, '!$::corporate || !$::expert', "doInstallStep" ], + exitInstall => [ __("Exit install"), 0, 0, '$::beginner' ], ); for (my $i = 0; $i < @installSteps; $i += 2) { my %h; @h{@installStepsFields} = @{ $installSteps[$i + 1] }; @@ -288,7 +288,7 @@ sub partitionDisks { eval { fs::umount_all($o->{fstab}, $o->{prefix}) } if $o->{fstab} && !$::testing; my $ok = fsedit::get_root($o->{fstab} || []) ? 1 : install_any::getHds($o); - my $auto = $ok && !$o->{partitioning}{readonly} && + my $auto = $ok && !$o->{partitioning}{readonly} && !$o->{lnx4win} && ($o->{partitioning}{auto_allocate} || $::beginner && fsedit::get_fstab(@{$o->{hds}}) < 3); eval { fsedit::auto_allocate($o->{hds}, $o->{partitions}) } if $auto; diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 94922ba1a..4d9a1e3ce 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -330,12 +330,17 @@ _("DiskDrake failed to read correctly the partition table. Continue at your own risk!")) if !$ok2 && $ok && !$o->{partitioning}{readonly}; my @win = grep { isFat($_) && isFat({ type => fsedit::typeOfPart($_->{device}) }) } @{$o->{fstab}}; - my @nt = grep { isNT($_) && isNT( { type => fsedit::typeOfPart($_->{device}) }) } @{$o->{fstab}}; +# my @nt = grep { isNT($_) && isNT( { type => fsedit::typeOfPart($_->{device}) }) } @{$o->{fstab}}; log::l("win parts: ", join ",", map { $_->{device} } @win) if @win; - log::l("nt parts: ", join ",", map { $_->{device} } @nt) if @nt; - $_->{mntpoint} = @win == 1 ? "/mnt/windows" : "/mnt/win_$_->{device_windobe}" foreach @win; - $_->{mntpoint} = @nt == 1 ? "/mnt/nt" : "/mnt/nt_$_->{device_windobe}" foreach @nt; - +# log::l("nt parts: ", join ",", map { $_->{device} } @nt) if @nt; + if (@win == 1) { + $win[0]{mntpoint} = "/mnt/windows"; + } else { + my %w; foreach (@win) { + my $v = $w{$_->{device_windobe}}++; + $_->{mntpoint} = "/mnt/win_$_->{device_windobe}" . ($v ? $v+1 : ''); + } + } $ok2; } diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index aa2732aee..10d114b8a 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -131,12 +131,13 @@ sub doPartitionDisks { my $size = loopback::getFree($handle->{dir}, $real_part); my $max_linux = 1000 << 11; $max_linux *= 10 if $::expert; - my $min_linux = 300 << 11; $max_linux /= 3 if $::expert; - my $min_freewin = 100 << 11; $min_freewin = 0 if $::expert; + my $min_linux = 300 << 11; $min_linux /= 3 if $::expert; + my $min_freewin = 100 << 11; $min_freewin /= 10 if $::expert; - my $swap = { type => 0x82, loopback_file => '/lnx4win/swapfile', mntpoint => 'swap', size => 64 << 11, device => $real_part, notFormatted => 1 }; + my $swap = { type => 0x82, loopback_file => '/lnx4win/swapfile', mntpoint => 'swap', size => 64 << 11, device => $real_part, notFormatted => 1 }; my $root = { type => 0x83, loopback_file => '/lnx4win/linuxsys.img', mntpoint => '/', size => 0, device => $real_part, notFormatted => 1 }; $root->{size} = min($size - $swap->{size} - $min_freewin, $max_linux); + log::l("lnx4win $root->{size} <= $min_linux (minlinux), $size (minavail) - $swap->{size} (swapsize) - $min_freewin (minfreewin), $max_linux (maxlinux)"); $root->{size} > $min_linux or die "not enough room on that partition for lnx4win"; $o->doPartitionDisksLnx4winSize(\$root->{size}, \$swap->{size}, $size - 2 * $swap->{size}, 2 * $swap->{size}); @@ -439,9 +440,9 @@ sub configureNetwork($) { network::sethostname($o->{netc}) unless $::testing; network::addDefaultRoute($o->{netc}) unless $::testing; - $o->pkg_install("dhcpxd") if grep { $_->{BOOTPROTO} =~ /^(dhcp|bootp)$/ } @{$o->{intf}}; + $o->pkg_install("dhcpxd") if grep { $_->{BOOTPROTO} =~ /^(dhcp)$/ } @{$o->{intf}}; # Handle also pump (this is still in initscripts no?) - $o->pkg_install("pump") if grep { $_->{BOOTPROTO} =~ /^(pump)$/ } @{$o->{intf}}; + $o->pkg_install("pump") if grep { $_->{BOOTPROTO} =~ /^(pump|bootp)$/ } @{$o->{intf}}; #-res_init(); #- reinit the resolver so DNS changes take affect miscellaneousNetwork($o); @@ -782,6 +783,7 @@ sub setupBootloaderBefore { $e->{append} .= " prof=Home"; } lilo::suggest_floppy($o->{bootloader}) if $o->{security} <= 3; + $o->{bootloader}{keytable} ||= keyboard::keyboard2kmap($o->{keyboard}); } } diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index a9d4984d9..8df4840fb 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -165,6 +165,8 @@ sub selectInstallClass1 { $w->main; mapn { $verif->($_[1]) if $_[0]->active } \@radios, $l; + create_steps_window($o); + $w->{retval}; } @@ -752,10 +754,7 @@ sub create_steps_window { $reachableSteps{$_} = $b if $step->{reachable}; $b; } grep { - local $_ = $o->{steps}{$_}{hidden}; - /^$/ or $o->{installClass} and !/!expert/ || $::expert - and !/beginner/ || !$::beginner - and !/!corporate/ || $::corporate; + !eval $o->{steps}{$_}{hidden}; } @{$o->{orderedSteps}}), 0, gtkpack(new Gtk::HBox(0,0), map { my $t = $_; -- cgit v1.2.1