diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-09-18 21:42:21 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-09-18 21:42:21 +0000 |
commit | d1f790931b430a7e632cac0b46313433fec7f998 (patch) | |
tree | acd811801c15446bdafd7f01b8753746d7f1de81 /perl-install | |
parent | ee9f3710e10dc30c02816097010c5a27868e33f5 (diff) | |
download | drakx-d1f790931b430a7e632cac0b46313433fec7f998.tar drakx-d1f790931b430a7e632cac0b46313433fec7f998.tar.gz drakx-d1f790931b430a7e632cac0b46313433fec7f998.tar.bz2 drakx-d1f790931b430a7e632cac0b46313433fec7f998.tar.xz drakx-d1f790931b430a7e632cac0b46313433fec7f998.zip |
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/ChangeLog | 21 | ||||
-rw-r--r-- | perl-install/Xconfigurator.pm | 10 | ||||
-rw-r--r-- | perl-install/bootloader.pm | 2 | ||||
-rw-r--r-- | perl-install/detect_devices.pm | 9 | ||||
-rw-r--r-- | perl-install/fsedit.pm | 3 | ||||
-rw-r--r-- | perl-install/install_interactive.pm | 4 | ||||
-rw-r--r-- | perl-install/interactive.pm | 3 |
7 files changed, 35 insertions, 17 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog index a83b2ff26..da0506932 100644 --- a/perl-install/ChangeLog +++ b/perl-install/ChangeLog @@ -1,5 +1,26 @@ 2000-09-18 Pixel <pixel@mandrakesoft.com> + * Xconfigurator.pm (testFinalConfig): don't skip the test in auto + if called via "Test again" + * Xconfigurator.pm (resolutionsConfiguration): ensure all depth + are bounded + + * bootloader.pm (suggest): don't put "linux-nonfb" if "linux" is + classic and no-fb + + * fsedit.pm (check_mntpoint): add a check for /etc /lib... which + must not be mount points. Also check that /home, /tmp and /usr are + on trueFS + + * interactive.pm (ask_from_entries_ref): add bounding of "val" in + case of type "range". die if min > max. + +2000-09-18 DrakX <install@linux-mandrake.com> + + * snapshot uploaded + +2000-09-18 Pixel <pixel@mandrakesoft.com> + * install_steps_interactive.pm (choosePartitionsToFormat): nicer partition/device display diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index 9c3fd8e64..06e8afe18 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -386,7 +386,7 @@ sub testConfig($) { } sub testFinalConfig($;$$) { - my ($o, $auto, $skiptest) = @_; + my ($o, $auto, $skiptest, $skip_badcard) = @_; $o->{monitor}{hsyncrange} && $o->{monitor}{vsyncrange} or $in->ask_warn('', _("Monitor not configured")), return; @@ -411,8 +411,8 @@ sub testFinalConfig($;$$) { my $mesg = _("Do you want to test the configuration?"); my $def = 1; if ($bad_card && !$::isStandalone) { - !$::expert || $auto and return 1; - $mesg = $mesg . "\n" . _("Warning: testing is dangerous on this graphic card"); + $skip_badcard and return 1; + $mesg = $mesg . "\n" . _("Warning: testing this graphic card may freeze your computer"); $def = 0; } $auto && $def or $in->ask_yesorno(_("Test of the configuration"), $mesg, $def) or return 1; @@ -727,7 +727,7 @@ Try with another video card or monitor")), return; #- remove all biggest resolution (keep the small ones for ctl-alt-+) #- otherwise there'll be a virtual screen :( - $card->{depth}{$depth} = [ grep { $_->[0] <= $wres } @{$card->{depth}{$depth}} ]; + $_ = [ grep { $_->[0] <= $wres } @$_ ] foreach values %{$card->{depth}}; $card->{default_wres} = $wres; $card->{vga_mode} = $vgamodes{"${wres}xx$depth"} || $vgamodes{"${res}x$depth"}; #- for use with frame buffer. $o->{default_depth} = $depth; @@ -1095,7 +1095,7 @@ sub main { } my $ok = resolutionsConfiguration($o, auto => $::auto, noauto => $::noauto); - $ok &&= testFinalConfig($o, $::auto, $o->{skiptest}); + $ok &&= testFinalConfig($o, $::auto, $o->{skiptest}, $::auto); my $quit; until ($ok || $quit) { diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 0c4659015..c2516626e 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -259,7 +259,7 @@ wait %d seconds for default boot. { label => $isSecure || $isSMP ? 'linux-up' : 'linux-nonfb', root => "/dev/$root", - }); + }) if !$isSecure && !$isSMP && $vga_fb; add_kernel($prefix, $lilo, $kernelVersion, '', { label => 'failsafe', diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index d62999b4b..88db1cb2d 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -46,7 +46,7 @@ sub cdroms() { if (my @l2 = getIDEBurners()) { require modules; modules::add_alias('scsi_hostadapter', 'ide-scsi'); - my $nb = 1 + max(-1, map { $_->{device} =~ /scd(\d+)/ } @l); + my $nb = 1 + max(-1, map { $_->{device} =~ /scd (\d+)/x } @l); foreach my $b (@l2) { log::l("getIDEBurners: $b"); my ($e) = grep { $_->{device} eq $b } @l or next; @@ -162,15 +162,8 @@ sub getDAC960() { sub getNet() { grep { hasNetDevice($_) } @netdevices; } -sub getPlip() { - foreach (0..2) { - hasNetDevice("plip$_") and log::l("plip$_ will be used for PLIP"), return "plip$_"; - } - undef; -} sub hasNet() { goto &getNet } -sub hasPlip() { goto &getPlip } sub hasEthernet() { hasNetDevice("eth0"); } sub hasTokenRing() { hasNetDevice("tr0"); } sub hasNetDevice($) { c::hasNetDevice($_[0]) } diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm index b301524f5..ea1c80a81 100644 --- a/perl-install/fsedit.pm +++ b/perl-install/fsedit.pm @@ -255,7 +255,8 @@ sub check_mntpoint { $check->($fake_part) unless $mntpoint eq '/' && $loopbackDevice; #- '/' is a special case, no loop check die "raid / with no /boot" if $mntpoint eq "/" && isMDRAID($part) && !has_mntpoint("/boot", $hds); - die _("You need a true filesystem (ext2, reiserfs) for this mount point\n") if !isTrueFS($part) && member($mntpoint, qw(/ /usr)); + die _("This directory should remain within the root filesystem") if member($mntpoint, qw(/bin /dev /etc /lib /sbin)); + die _("You need a true filesystem (ext2, reiserfs) for this mount point\n") if !isTrueFS($part) && member($mntpoint, qw(/ /home /tmp /usr /var)); #- if ($part->{start} + $part->{size} > 1024 * $hd->cylinder_size() && arch() =~ /i386/) { #- die "/boot ending on cylinder > 1024" if $mntpoint eq "/boot"; #- die "/ ending on cylinder > 1024" if $mntpoint eq "/" && !has_mntpoint("/boot", $hds); diff --git a/perl-install/install_interactive.pm b/perl-install/install_interactive.pm index 7f635f18f..187fddf1c 100644 --- a/perl-install/install_interactive.pm +++ b/perl-install/install_interactive.pm @@ -87,8 +87,8 @@ sub partitionWizardSolutions { my ($s_root, $s_swap); my $part = $o->ask_from_listf('', _("Which partition do you want to use to put Linux4Win?"), \&partition_table_raw::description, \@ok_forloopback) or return; $o->ask_from_entries_refH('', _("Choose the sizes"), [ - _("Root partition size in MB: ") => { val => \$s_root, min => 1 + ($min_linux >> 11), max => min($part->{free} - 2 * $max_swap - $min_freewin, $max_linux) >> 11, type => 'range' }, - _("Swap partition size in MB: ") => { val => \$s_swap, min => 1 + ($min_swap >> 11), max => 2 * $max_swap >> 11, type => 'range' }, + _("Root partition size in MB: ") => { val => \$s_root, min => 1 + ($min_linux >> 11), max => min($part->{free} - $max_swap - $min_freewin, $max_linux) >> 11, type => 'range' }, + _("Swap partition size in MB: ") => { val => \$s_swap, min => 1 + ($min_swap >> 11), max => $max_swap >> 11, type => 'range' }, ]) or return; push @{$part->{loopback}}, { type => 0x83, loopback_file => '/lnx4win/linuxsys.img', mntpoint => '/', size => $s_root << 11, device => $part, notFormatted => 1 }, diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index b797b8fc5..e11a72029 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -251,6 +251,9 @@ sub ask_from_entries_ref($$$$;$%) { if (@{$_->{list} || []} > 1) { add2hash_($_, { not_edit => 1, type => 'list' }); ${$_->{val}} = $_->{list}[0] if $_->{not_edit} && !member(${$_->{val}}, @{$_->{list}}); + } elsif ($_->{type} eq 'range') { + $_->{min} <= $_->{max} or die "bad range (called from " . caller() . ")"; + ${$_->{val}} = max($_->{min}, min(${$_->{val}}, $_->{max})); } $_; } |