summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-11-10 12:35:02 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-11-10 12:35:02 +0000
commitda94715e3d4e07486df853675958fd522016810c (patch)
tree8edacac989817a4567c5affc93694aeb7ff65d54 /perl-install
parente493243f413480eaab130284867a2fcb0f2b649d (diff)
downloaddrakx-da94715e3d4e07486df853675958fd522016810c.tar
drakx-da94715e3d4e07486df853675958fd522016810c.tar.gz
drakx-da94715e3d4e07486df853675958fd522016810c.tar.bz2
drakx-da94715e3d4e07486df853675958fd522016810c.tar.xz
drakx-da94715e3d4e07486df853675958fd522016810c.zip
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install2.pm2
-rw-r--r--perl-install/install_any.pm12
-rw-r--r--perl-install/install_steps_interactive.pm8
-rw-r--r--perl-install/mouse.pm3
4 files changed, 15 insertions, 10 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index cbc7cc200..5226bbbab 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -533,7 +533,7 @@ sub main {
add2hash(network::findIntf($o->{intf} ||= [], $l->{DEVICE}), $l);
}
- eval { run_program::run("rmmod", "vfat") };
+ modules::unload($_) foreach qw(vfat msdos fat);
modules::load_deps("/modules/modules.dep");
modules::read_stage1_conf("/tmp/conf.modules");
modules::read_already_loaded();
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 78f3d51ca..8d0495323 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -21,6 +21,7 @@ use partition_table_raw;
use devices;
use fsedit;
use network;
+use modules;
use lilo;
use detect_devices;
use pkgs;
@@ -333,8 +334,10 @@ sub killCardServices {
sub ejectCdrom() {
cat_("/proc/mounts") =~ m|/tmp/(\S+)\s+/tmp/rhimage|;
- my $f = eval { detect_devices::tryOpen($1) } or next;
- ioctl $f, c::CDROM_LOCKDOOR(), 0;
+ my $f = eval { detect_devices::tryOpen($1) } or return;
+ getFile("XXX"); #- close still opened filehandle
+ eval { fs::umount("/tmp/rhimage") };
+ ioctl $f, c::CDROM_LOCKDOOR(), 0; #- in case the umount fails...
ioctl $f, c::CDROMEJECT(), 1;
}
@@ -406,7 +409,7 @@ sub loadO {
-e $f or $f .= ".pl";
$o = loadO($O, $f);
fs::umount("/mnt") unless $::testing;
- eval { run_program::run("rmmod", "vfat") };
+ modules::unload($_) foreach qw(vfat fat);
} else {
-e $f or $f .= ".pl";
{
@@ -414,10 +417,11 @@ sub loadO {
open F, $f or die _("Error reading file $f");
local $/ = "\0";
+ no strict;
eval <F>;
}
$@ and log::l _("Bad kickstart file %s (failed %s)", $f, $@);
- add2hash_($o, $O);
+ add2hash_($o ||= {}, $O);
}
bless $o, ref $O;
}
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 81ba51710..5e8eb1c33 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -152,8 +152,8 @@ sub setupSCSI { setup_thiskind($_[0], 'scsi', $_[1], $_[2]) }
sub ask_mntpoint_s {
my ($o, $fstab) = @_;
my @fstab = grep { isExt2($_) } @$fstab;
- @fstab = grep { !isSwap($_) } @$fstab if @fstab == 0;
- @fstab = @$fstab if @fstab == 0;
+ @fstab = grep { isSwap($_) } @$fstab if @fstab == 0;
+# @fstab = @$fstab if @fstab == 0;
die _("no available partitions") if @fstab == 0;
my $msg = sub { "$_->{device} " . _("(%dMb)", $_->{size} / 1024 / 2) };
@@ -889,8 +889,6 @@ _("Some steps are not completed.
Do you really want to quit now?"), 0);
- $o->SUPER::exitInstall;
-
$o->ask_warn('',
_("Congratulations, installation is complete.
Remove the boot media and press return to reboot.
@@ -900,6 +898,8 @@ consult the Errata available from http://www.linux-mandrake.com/.
Information on configuring your system is available in the post
install chapter of the Official Linux-Mandrake User's Guide.")) if $alldone && !$::g_auto_install;
+
+ $o->SUPER::exitInstall;
}
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 6303d3b1a..9dd539623 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -12,6 +12,7 @@ use pci_probing::main;
use detect_devices;
use run_program;
use commands;
+use modules;
use log;
my @mouses_fields = qw(nbuttons device MOUSETYPE XMOUSETYPE FULLNAME);
@@ -91,7 +92,7 @@ sub detect() {
my %l;
eval { commands::modprobe("serial") };
@l{qw(FULLNAME nbuttons MOUSETYPE XMOUSETYPE device)} = split("\n", `mouseconfig --nointeractive 2>/dev/null`) and return \%l;
- eval { run_program::run("rmmod", "serial") };
+ modules::unload("serial");
if (my ($c) = pci_probing::main::probe("SERIAL_USB")) {
eval { modules::load($c->[1], 'usbmouse') };
#n379'>379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556
use common qw(:common);

%depths = (
      8 => __("256 colors"),
#     15 => __("32 thousand colors"),
     16 => __("65 thousand colors"),
     24 => __("16 millions of colors"),
     32 => __("4 billions of colors"),
);
@depths = ikeys(%depths);

$resolution_wanted = "1024x768";
@resolutions = qw(640x480 800x600 1024x768 1152x864 1280x1024 1600x1200);


@accelservers = qw(S3 Mach32 Mach8 8514 P9000 AGX W32 Mach64 I128 S3V 3DLabs);
@allservers = (qw(Mono VGA16 SVGA), @accelservers);

%videomemory = (
    __("256 kb") => 256, 
    __("512 kb") => 512, 
    __("1 mb") => 1024, 
    __("2 mb") => 2048, 
    __("4 mb") => 4096, 
    __("8 mb") => 8192,
    __("16 mb or more") => 16384,
);

%standard_monitors = (
  __("Standard VGA, 640x480 in 60 Hz")                             => [ '640x480@60',      "31.5"            , "60" ],
  __("Super VGA, 800x600 in 56 Hz") 				   => [ '800x600@56',      "31.5-35.1"       , "55-60" ],
  __("8514 Compatible, 1024x768 in 87 Hz interlaced (no 800x600)") => [ '8514 compatible', "31.5,35.5"       , "60,70,87" ],
  __("Super VGA, 1024x768 in 87 Hz interlaced, 800x600 in 56 Hz")  => [ '1024x768@87i',    "31.5,35.15,35.5" , "55-90" ],
  __("Extended Super VGA, 800x600 in 60 Hz, 640x480 in 72 Hz")     => [ '800x600@60',      "31.5-37.9"       , "55-90" ],
  __("Non-Interlaced SVGA, 1024x768 in 60 Hz, 800x600 in 72 Hz")   => [ '1024x768@60',     "31.5-48.5"       , "55-90" ],
  __("High Frequency SVGA, 1024x768 in 70 Hz") 		           => [ '1024x768@70',     "31.5-57.0"       , "50-90" ],
  __("Multi-frequency that can do 1280x1024 in 60 Hz") 	           => [ '1280x1024@60',    "31.5-64.3"       , "50-90" ],
  __("Multi-frequency that can do 1280x1024 in 74 Hz") 	           => [ '1280x1024@74',    "31.5-79.0"       , "50-100" ],
  __("Multi-frequency that can do 1280x1024 in 76 Hz") 	           => [ '1280x1024@76',    "31.5-82.0"       , "40-100" ],
  __("Monitor that can do 1600x1200 in 70 Hz")                     => [ '1600x1200@70',    "31.5-88.0"       , "50-120" ],
  __("Monitor that can do 1600x1200 in 76 Hz")		           => [ '1600x1200@76',    "31.5-94.0"       , "50-160" ],
);

# * Screen/video card configuration. 
%ramdacs = (
    __("No RAMDAC Setting (recommended)")               => '',
    __("AT&T 20C490 (S3 and AGX servers, ARK driver)"), => 'att20c490',
    __("AT&T 20C498/21C498/22C498 (S3, autodetected)"),	=> 'att20c498',
    __("AT&T 20C409/20C499 (S3, autodetected)"),	=> 'att20c409',
    __("AT&T 20C505 (S3)"),				=> 'att20c505',
    __("BrookTree BT481 (AGX)"),			=> 'bt481',
    __("BrookTree BT482 (AGX)"),			=> 'bt482',
    __("BrookTree BT485/9485 (S3)"),			=> 'bt485',
    __("Sierra SC15025 (S3, AGX)"),			=> 'sc15025',
    __("S3 GenDAC (86C708) (autodetected)"),		=> 's3gendac',
    __("S3 SDAC (86C716) (autodetected)"),		=> 's3_sdac',
    __("STG-1700 (S3, autodetected)"),			=> 'stg1700',
    __("STG-1703 (S3, autodetected)"),			=> 'stg1703',
    __("TI 3020 (S3)"),					=> 'ti3020',
    __("TI 3025 (S3, autodetected)"),			=> 'ti3025',
    __("TI 3026 (S3, autodetected)"),			=> 'ti3026',
    __("IBM RGB 514 (S3, autodetected)"),		=> 'ibm_rgb514',
    __("IBM RGB 524 (S3, autodetected)"),		=> 'ibm_rgb524',
    __("IBM RGB 525 (S3, autodetected)"),		=> 'ibm_rgb525',
    __("IBM RGB 526 (S3)"),				=> 'ibm_rgb526',
    __("IBM RGB 528 (S3, autodetected)"),		=> 'ibm_rgb528',
    __("ICS5342 (S3, ARK)"),				=> 'ics5342',
    __("ICS5341 (W32)"),				=> 'ics5341',
    __("IC Works w30C516 ZoomDac (ARK)"),		=> 'zoomdac',
    __("Normal DAC"),					=> 'normal',
);

@clockchip_name = (
    __("No Clockchip Setting (recommended)")                         => '',
    __("Chrontel 8391")                                              => 'ch8391',
    __("ICD2061A and compatibles (ICS9161A => DCS2824)")	     => 'icd2061a',
    __("ICS2595")                                                    => 'ics2595',
    __("ICS5342 (similar to SDAC, but not completely compatible)")   => 'ics5342',
    __("ICS5341")						     => 'ics5341',
    __("S3 GenDAC (86C708) and ICS5300 (autodetected)")	             => 's3gendac',
    __("S3 SDAC (86C716)")					     => 's3_sdac',
    __("STG 1703 (autodetected)")				     => 'stg1703',
    __("Sierra SC11412")					     => 'sc11412',
    __("TI 3025 (autodetected)")				     => 'ti3025',
    __("TI 3026 (autodetected)")				     => 'ti3026',
    __("IBM RGB 51x/52x (autodetected)")			     => 'ibm_rgb5xx',
);















$intro_text = "
This program will create a basic XF86Config file, based on menu selections you make.

The XF86Config file usually resides in /usr/X11R6/lib/X11 or /etc/X11. A 
sample XF86Config file is supplied with XFree86; it is configured for a 
standard VGA card and monitor with 640x480 resolution. 

You can either take the sample XF86Config as a base and edit it for your 
configuration, or let this program produce a base XF86Config file for your 
configuration and fine-tune it. Refer to /usr/X11R6/lib/X11/doc/README.Config 
for a detailed overview of the configuration process. 

For accelerated servers (including accelerated drivers in the SVGA server), 
there are many chipset and card-specific options and settings. This program 
does not know about these. On some configurations some of these settings must 
be specified. Refer to the server man pages and chipset-specific READMEs. 

Before continuing with this program, make sure you know the chipset and 
amount of video memory on your video card. SuperProbe can help with this.  
It is also helpful if you know what server you want to run.";

$finalcomment_text = "
configuration file has been written. Take a look at it before running 'startx'.
Note that the XF86Config file must be in one of the directories searched by the
server (e.g. /etc/X11/XF86Config) in order to be used. Within the server press
ctrl, alt and '+' simultaneously to cycle video resolutions. Pressing ctrl, alt
and backspace simultaneously immediately exits the server (use if the monitor
doesn't sync for a particular mode).

For further configuration, refer to /usr/X11R6/lib/X11/doc/README.Config.
";

$s3_comment = '
# Use Option "nolinear" if the server doesn\'t start up correctly
# (this avoids the linear framebuffer probe). If that fails try
# option \"nomemaccess\".
#
# Refer to /usr/X11R6/lib/doc/README.S3, and the XF86_S3 man page.
';

$cirrus_comment = '
# Use Option \"no_bitblt\" if you have graphics problems. If that fails
# try Option \"noaccel\".
# Refer to /usr/X11R6/lib/doc/README.cirrus.
# To allow linear addressing, uncomment the Option line and the
# address that the card maps the framebuffer to.
';

$probeonlywarning_text = '
It is possible that the hardware detection routines in the server some how 
cause the system to crash and the screen to remain blank. If this is the 
case, skip this step the next time. The server may need a 
Ramdac, ClockChip or special option (e.g. "nolinear" for S3) to probe 
and start-up correctly.
';

$monitorintro_text = __('
Now we want to set the specifications of the monitor. The two critical 
parameters are the vertical refresh rate, which is the rate at which the 
the whole screen is refreshed, and most importantly the horizontal sync rate, 
which is the rate at which scanlines are displayed.

The valid range for horizontal sync and vertical sync should be documented 
in the manual of your monitor. If in doubt, check the monitor database 
/usr/X11R6/lib/X11/doc/Monitors to see if your monitor is there.
');

$hsyncintro_text = __('
You must indicate the horizontal sync range of your monitor. You can either 
select one of the predefined ranges below that correspond to industry-
standard monitor types, or give a specific range.

It is VERY IMPORTANT that you do not specify a monitor type with a horizontal 
sync range that is beyond the capabilities of your monitor. If in doubt, 
choose a conservative setting.
');

$vsyncintro_text = __('
You must indicate the vertical sync range of your monitor. You can either 
select one of the predefined ranges below that correspond to industry-
standard monitor types, or give a specific range. For interlaced modes, 
the number that counts is the high one (e.g. 87 Hz rather than 43 Hz).
');

$XF86firstchunk_text = '
# File generated by XConfigurator.

# **********************************************************************
# Refer to the XF86Config(4/5) man page for details about the format of 
# this file.