summaryrefslogtreecommitdiffstats
path: root/perl-install/share/po/eo.po
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/share/po/eo.po')
-rw-r--r--perl-install/share/po/eo.po88
1 files changed, 44 insertions, 44 deletions
diff --git a/perl-install/share/po/eo.po b/perl-install/share/po/eo.po
index 288027c57..34b33ea8e 100644
--- a/perl-install/share/po/eo.po
+++ b/perl-install/share/po/eo.po
@@ -42,9 +42,9 @@ msgid ""
msgstr ""
#: ../move/move.pm:452
-#, fuzzy, c-format
+#, c-format
msgid "Retry"
-msgstr "Restaŭru de dosiero"
+msgstr "R&eprovu"
#: ../move/move.pm:453 ../move/move.pm:497
#, c-format
@@ -1421,9 +1421,9 @@ msgid "Active Directory with Winbind"
msgstr ""
#: authentication.pm:55
-#, fuzzy, c-format
+#, c-format
msgid "Local file:"
-msgstr "Lokaj dosieroj:"
+msgstr "Lokala dosiero :"
#: authentication.pm:55
#, c-format
@@ -2842,7 +2842,7 @@ msgstr "La pasvortoj ne egalas"
#: standalone/drakconnect:419 standalone/drakroam:112
#, c-format
msgid "Encryption key"
-msgstr ""
+msgstr "Ĉifroŝlosilo:"
#: diskdrake/interactive.pm:1330
#, c-format
@@ -5115,7 +5115,7 @@ msgstr ""
#: install_any.pm:522 standalone/draknfs:288
#, c-format
msgid "Directory"
-msgstr ""
+msgstr "Dosierujo"
#: install_any.pm:571
#, fuzzy, c-format
@@ -12275,9 +12275,9 @@ msgid ""
msgstr ""
#: printer/printerdrake.pm:2379
-#, fuzzy, c-format
+#, c-format
msgid "Command line"
-msgstr "Domajna nomo"
+msgstr "Komandlinio:"
#: printer/printerdrake.pm:2383
#, c-format
@@ -13269,9 +13269,9 @@ msgid "Checking installed software..."
msgstr ""
#: printer/printerdrake.pm:4598
-#, fuzzy, c-format
+#, c-format
msgid "Removing %s..."
-msgstr "Distingivo: %s\n"
+msgstr "Mi forigas %s"
#: printer/printerdrake.pm:4602
#, fuzzy, c-format
@@ -14966,9 +14966,9 @@ msgid "Apache"
msgstr "Apache"
#: share/compssUsers.pl:89
-#, fuzzy, c-format
+#, c-format
msgid "Groupware"
-msgstr "Laborgrupo"
+msgstr "G&rupa programaro"
#: share/compssUsers.pl:90
#, c-format
@@ -15567,9 +15567,9 @@ msgid "This will take a few minutes."
msgstr ""
#: standalone/drakTermServ:453 standalone/drakTermServ:493
-#, fuzzy, c-format
+#, c-format
msgid "Done!"
-msgstr "Finata"
+msgstr "F&inu !"
#: standalone/drakTermServ:464 standalone/drakTermServ:849
#, c-format
@@ -16201,7 +16201,7 @@ msgstr ""
#: standalone/drakautoinst:77 standalone/drakautoinst:78
#: standalone/drakautoinst:92
-#, fuzzy, c-format
+#, c-format
msgid "Creating auto install floppy"
msgstr "Kreas aŭtoinstalan disketon"
@@ -16397,9 +16397,9 @@ msgstr ""
#: standalone/drakbackup:543 standalone/drakbackup:614
#: standalone/drakbackup:670
-#, fuzzy, c-format
+#, c-format
msgid "Total progress"
-msgstr "Provu pordojn"
+msgstr "Totala progreso:"
#: standalone/drakbackup:596
#, c-format
@@ -17954,9 +17954,9 @@ msgid "Find Package"
msgstr "Trovu pakaĵon"
#: standalone/drakbug:87
-#, fuzzy, c-format
+#, c-format
msgid "Package: "
-msgstr "Elektado de Pakaĵoj"
+msgstr "Pakaĵo : "
#: standalone/drakbug:88
#, c-format
@@ -18070,9 +18070,9 @@ msgid "Gateway:"
msgstr "Kluzo:"
#: standalone/drakconnect:89 standalone/drakconnect:807
-#, fuzzy, c-format
+#, c-format
msgid "Interface:"
-msgstr "Interreto"
+msgstr "Interfaco :"
#: standalone/drakconnect:93 standalone/net_monitor:116
#, c-format
@@ -18167,9 +18167,9 @@ msgid "Modem timeout"
msgstr "Winmodem-konekto"
#: standalone/drakconnect:531
-#, fuzzy, c-format
+#, c-format
msgid "Use lock file"
-msgstr "Elektu dosieron"
+msgstr "U&zu ŝlosodosieron"
#: standalone/drakconnect:533
#, c-format
@@ -19047,12 +19047,12 @@ msgstr "Detala informo"
#: standalone/drakhosts:115
#, c-format
msgid "IP address:"
-msgstr ""
+msgstr "IP-adreso :"
#: standalone/drakhosts:116
#, c-format
msgid "Host name:"
-msgstr ""
+msgstr "Poŝtejo :"
#: standalone/drakhosts:117
#, c-format
@@ -19808,7 +19808,7 @@ msgstr "Loka printilo"
#: standalone/draksambashare:94
#, c-format
msgid "Printer name"
-msgstr ""
+msgstr "Presilonomo:"
#: standalone/draksambashare:98 standalone/draksambashare:594
#, c-format
@@ -20036,7 +20036,7 @@ msgstr ""
#: standalone/draksambashare:611
#, c-format
msgid "Print command:"
-msgstr ""
+msgstr "P&res-komando:"
#: standalone/draksambashare:612
#, c-format
@@ -20046,7 +20046,7 @@ msgstr ""
#: standalone/draksambashare:613
#, c-format
msgid "Printing:"
-msgstr ""
+msgstr "Presante :"
#: standalone/draksambashare:629
#, c-format
@@ -20084,14 +20084,14 @@ msgid "Samba share directory"
msgstr "Ne estas dosierujo"
#: standalone/draksambashare:766
-#, fuzzy, c-format
+#, c-format
msgid "Share name:"
-msgstr "Opuza nomo"
+msgstr "Opuza nomo :"
#: standalone/draksambashare:772
#, c-format
msgid "Public:"
-msgstr ""
+msgstr "Publika :"
#: standalone/draksambashare:796
#, c-format
@@ -20112,7 +20112,7 @@ msgstr ""
#: standalone/draksambashare:928
#, c-format
msgid "User name:"
-msgstr ""
+msgstr "Salutnomo :"
#: standalone/draksambashare:929 standalone/harddrake2:551
#, c-format
@@ -20210,9 +20210,9 @@ msgid "LOCAL"
msgstr ""
#: standalone/draksec:53 standalone/net_applet:449
-#, fuzzy, c-format
+#, c-format
msgid "Ignore"
-msgstr "singapuro"
+msgstr "I&gnoru"
#. -PO: Do not alter the <span ..> and </span> tags.
#. -PO: Translate the security levels (Poor, Standard, High, Higher and Paranoid) in the same way, you translated these individuals words.
@@ -20821,9 +20821,9 @@ msgid "IKE daemon racoon"
msgstr ""
#: standalone/drakvpn:281 standalone/drakvpn:292
-#, fuzzy, c-format
+#, c-format
msgid "Configuration file"
-msgstr "LAN Konfiguraĵo"
+msgstr "Agordodosiero:"
#: standalone/drakvpn:282
#, c-format
@@ -21932,7 +21932,7 @@ msgstr ""
#: standalone/drakxtv:88
#, c-format
msgid "Area:"
-msgstr ""
+msgstr "Areo :"
#: standalone/drakxtv:93
#, c-format
@@ -22276,7 +22276,7 @@ msgstr ""
#: standalone/harddrake2:74
#, c-format
msgid "Flags"
-msgstr ""
+msgstr "F&lagoj"
#: standalone/harddrake2:74
#, c-format
@@ -22412,9 +22412,9 @@ msgid "format of floppies supported by the drive"
msgstr ""
#: standalone/harddrake2:97
-#, fuzzy, c-format
+#, c-format
msgid "Channel"
-msgstr "Nuligu"
+msgstr "K&analo"
#: standalone/harddrake2:97
#, c-format
@@ -23416,9 +23416,9 @@ msgstr "Servil-nomo"
#. -PO: "Add Printer" is a button text and the translation has to be AS SHORT AS POSSIBLE
#: standalone/printerdrake:239
-#, fuzzy, c-format
+#, c-format
msgid "Add Printer"
-msgstr "Printilo"
+msgstr "Aldonu presilon..."
#: standalone/printerdrake:239
#, fuzzy, c-format
@@ -24068,9 +24068,9 @@ msgid "No such directory"
msgstr "Ne estas dosierujo"
#: ugtk2.pm:985
-#, fuzzy, c-format
+#, c-format
msgid "No such file"
-msgstr "Lokala dosiero"
+msgstr "Ne ekzistas tia dosiero"
#: ugtk2.pm:1066
#, c-format
/a> 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 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735
package install_any; # $Id$

use diagnostics;
use strict;

use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @needToCopy @needToCopyIfRequiresSatisfied);

@ISA = qw(Exporter);
%EXPORT_TAGS = (
    all => [ qw(getNextStep spawnShell addToBeDone) ],
);
@EXPORT_OK = map { @$_ } values %EXPORT_TAGS;

#-######################################################################################
#- misc imports
#-######################################################################################
use common qw(:common :system :functional :file);
use run_program;
use partition_table qw(:types);
use partition_table_raw;
use devices;
use fsedit;
use modules;
use detect_devices;
use any;
use log;
use fs;

#- package that have to be copied for proper installation (just to avoid changing cdrom)
#- here XFree86 is copied entirey if not already installed, maybe better to copy only server.
@needToCopy = qw(
XFree86-8514 XFree86-AGX XFree86-Mach32 XFree86-Mach64 XFree86-Mach8 XFree86-Mono
XFree86-P9000 XFree86-S3 XFree86-S3V XFree86-SVGA XFree86-W32 XFree86-I128
XFree86-Sun XFree86-SunMono XFree86-Sun24 XFree86-3DLabs XFree86-FBDev XFree86-server
XFree86 XFree86-glide-module Device3Dfx Glide_V3-DRI Glide_V5 Mesa
dhcpcd pump dhcpxd dhcp-client isdn4net isdn4k-utils dev pptp-adsl-fr rp-pppoe ppp ypbind
rhs-printfilters lpr cups cups-drivers samba ncpfs
);
#- package that have to be copied only if all their requires are satisfied.
@needToCopyIfRequiresSatisfied = qw(
xpp kups
);

#-######################################################################################
#- Media change variables&functions
#-######################################################################################
my $postinstall_rpms = '';
my $current_medium = 1;
my $asked_medium = 1;
my $cdrom = undef;
sub useMedium($) {
    #- before ejecting the first CD, there are some files to copy!
    #- does nothing if the function has already been called.
    $_[0] > 1 and $::o->{method} eq 'cdrom' and setup_postinstall_rpms($::o->{prefix}, $::o->{packages});

    $asked_medium eq $_[0] or log::l("selecting new medium '$_[0]'");
    $asked_medium = $_[0];
}
sub changeMedium($$) {
    my ($method, $medium) = @_;
    log::l("change to medium $medium for method $method (refused by default)");
    0;
}
sub relGetFile($) {
    local $_ = $_[0];
    m|\.rpm$| ? "$::o->{packages}[2]{$asked_medium}{rpmsdir}/$_" : $_;
}
sub askChangeMedium($$) {
    my ($method, $medium) = @_;
    my $allow;
    do {
	eval { $allow = changeMedium($method, $medium) };
    } while ($@); #- really it is not allowed to die in changeMedium!!! or install will cores with rpmlib!!!
    $allow;
}
sub errorOpeningFile($) {
    my ($file) = @_;
    $file eq 'XXX' and return; #- special case to force closing file after rpmlib transaction.
    $current_medium eq $asked_medium and log::l("errorOpeningFile $file"), return; #- nothing to do in such case.
    $::o->{packages}[2]{$asked_medium}{selected} or return; #- not selected means no need for worying about.

    my $max = 32; #- always refuse after $max tries.
    if ($::o->{method} eq "cdrom") {
	cat_("/proc/mounts") =~ m|(/tmp/\S+)\s+/tmp/rhimage| and $cdrom = $1;
	return unless $cdrom;
	ejectCdrom($cdrom);
	while ($max > 0 && askChangeMedium($::o->{method}, $asked_medium)) {
	    $current_medium = $asked_medium;
	    eval { fs::mount($cdrom, "/tmp/rhimage", "iso9660", 'readonly') };
	    my $getFile = getFile($file); $getFile and return $getFile;
	    $current_medium = 'unknown'; #- don't know what CD is inserted now.
	    ejectCdrom($cdrom);
	    --$max;
	}
    } else {
	while ($max > 0 && askChangeMedium($::o->{method}, $asked_medium)) {
	    $current_medium = $asked_medium;
	    my $getFile = getFile($file); $getFile and return $getFile;
	    $current_medium = 'unknown'; #- don't know what CD image has been copied.
	    --$max;
	}
    }

    #- keep in mind the asked medium has been refused on this way.
    #- this means it is no more selected.
    $::o->{packages}[2]{$asked_medium}{selected} = undef;

    #- on cancel, we can expect the current medium to be undefined too,
    #- this enable remounting if selecting a package back.
    $current_medium = 'unknown';

    return;
}
sub getFile {
    my ($f, $method) = @_;
    my $rel = relGetFile($f);
    log::l("getFile $f ($method) relGetFile $rel");
    do {
	if ($method =~ /crypto/i) {
	    require crypto;
	    log::l("crypto::getFile $f");
	    crypto::getFile($f);
	} elsif ($::o->{method} eq "ftp") {
	    require ftp;
	    ftp::getFile($rel);
	} elsif ($::o->{method} eq "http") {
	    require http;
	    log::l("http getFile $f");
	    http::getFile($rel);
	} else {
	    #- try to open the file, but examine if it is present in the repository, this allow
	    #- handling changing a media when some of the file on the first CD has been copied
	    #- to other to avoid media change...
	    my $f2 = "$postinstall_rpms/$f";
	    $f2 = "/tmp/rhimage/$rel" unless $postinstall_rpms && -e $f2;
	    log::l("local getFile $f2");
	    open GETFILE, $f2 and *GETFILE;
	}
    } || errorOpeningFile($f);
}
sub getAndSaveFile {
    my ($file, $local) = @_;
    log::l("getAndSaveFile $file $local");
    local *F; open F, ">$local" or return;
    local $/ = \ (16 * 1024);
    my $f = ref($file) ? $file : getFile($file) or return;
    local $_;
    while (<$f>) { syswrite F, $_ }
    1;
}


#-######################################################################################
#- Post installation RPMS from cdrom only, functions
#-######################################################################################
sub setup_postinstall_rpms($$) {
    my ($prefix, $packages) = @_;

    $postinstall_rpms and return;
    $postinstall_rpms = "$prefix/usr/postinstall-rpm";

    require pkgs;
    require commands;

    log::l("postinstall rpms directory set to $postinstall_rpms");
    clean_postinstall_rpms(); #- make sure in case of previous upgrade problem.
    commands::mkdir_('-p', $postinstall_rpms);

    #- compute closure of unselected package that may be copied,
    #- don't complain if package does not exists as it may happen
    #- for the various architecture taken into account (X servers).
    my %toCopy;
    foreach (@needToCopy) {
	my $pkg = pkgs::packageByName($packages, $_);
	pkgs::selectPackage($packages, $pkg, 0, \%toCopy) if $pkg;
    }
    @toCopy{@needToCopyIfRequiresSatisfied} = ();

    my @toCopy = map { pkgs::packageByName($packages, $_) } keys %toCopy;

    #- extract headers of package, this is necessary for getting
    #- the complete filename of each package.
    #- copy the package files in the postinstall RPMS directory.
    #- last arg is default medium '' known as the CD#1.
    pkgs::extractHeaders($prefix, \@toCopy, $packages->[2]{1});
    commands::cp((map { "/tmp/rhimage/" . relGetFile(pkgs::packageFile($_)) } @toCopy), $postinstall_rpms);
}
sub clean_postinstall_rpms() {
    require commands;
    $postinstall_rpms and -d $postinstall_rpms and commands::rm('-rf', $postinstall_rpms);
}

#-######################################################################################
#- Functions
#-######################################################################################
sub kernelVersion {
    my ($o) = @_;
    local $_ = readlink("$::o->{prefix}/boot/vmlinuz") and return first(/vmlinuz-(.*)/);

    require pkgs;
    my $p = pkgs::packageByName($o->{packages}, "kernel") or die "I couldn't find the kernel package!";
    pkgs::packageVersion($p) . "-" . pkgs::packageRelease($p);
}


sub getNextStep {
    my ($s) = $::o->{steps}{first};
    $s = $::o->{steps}{$s}{next} while $::o->{steps}{$s}{done} || !$::o->{steps}{$s}{reachable};
    $s;
}

sub spawnShell {
    return if $::o->{localInstall} || $::testing;

    -x "/bin/sh" or die "cannot open shell - /usr/bin/sh doesn't exist";

    fork and return;

    local *F;
    sysopen F, "/dev/tty2", 2 or die "cannot open /dev/tty2 -- no shell will be provided";

    open STDIN, "<&F" or die '';
    open STDOUT, ">&F" or die '';
    open STDERR, ">&F" or die '';
    close F;

    c::setsid();

    ioctl(STDIN, c::TIOCSCTTY(), 0) or warn "could not set new controlling tty: $!";

    exec {"/bin/sh"} "-/bin/sh" or log::l("exec of /bin/sh failed: $!");
}

sub fsck_option {
    my ($o) = @_;
    my $y = $o->{security} < 3 && $::beginner ? "-y " : "";
    substInFile { s/^(\s*fsckoptions="?)(-y )?/$1$y/ } "$o->{prefix}/etc/rc.d/rc.sysinit";
}

sub getAvailableSpace {
    my ($o) = @_;

    #- make sure of this place to be available for installation, this could help a lot.
    #- currently doing a very small install use 36Mb of postinstall-rpm, but installing
    #- these packages may eat up to 90Mb (of course not all the server may be installed!).
    #- 65mb may be a good choice to avoid almost all problem of insuficient space left...
    my $minAvailableSize = 65 * sqr(1024);

    my $n = !$::testing && getAvailableSpace_mounted($o->{prefix}) || 
            getAvailableSpace_raw($o->{fstab}) * 512 / 1.07;
    $n - max(0.1 * $n, $minAvailableSize);
}

sub getAvailableSpace_mounted {
    my ($prefix) = @_;
    my $dir = -d "$prefix/usr" ? "$prefix/usr" : "$prefix";
    my (undef, $free) = common::df($dir) or return;
    log::l("getAvailableSpace_mounted $free KB");
    $free * 1024 || 1;
}
sub getAvailableSpace_raw {
    my ($fstab) = @_;

    do { $_->{mntpoint} eq '/usr' and return $_->{size} } foreach @$fstab;
    do { $_->{mntpoint} eq '/'    and return $_->{size} } foreach @$fstab;

    if ($::testing) {
	my $nb = 450;
	log::l("taking ${nb}MB for testing");
	return $nb << 11;
    }
    die "missing root partition";
}

sub setPackages($) {
    my ($o) = @_;

    require pkgs;
    if (!$o->{packages} || is_empty_hash_ref($o->{packages}[0])) {
	$o->{packages} = pkgs::psUsingHdlists($o->{prefix}, $o->{method});

	push @{$o->{default_packages}}, "nfs-utils-clients" if $o->{method} eq "nfs";
	push @{$o->{default_packages}}, "numlock" if $o->{miscellaneous}{numlock};
	push @{$o->{default_packages}}, "kernel-secure" if $o->{security} > 3;
	push @{$o->{default_packages}}, "kernel-smp" if $o->{security} <= 3 && detect_devices::hasSMP(); #- no need for kernel-smp if we have kernel-secure which is smp
	push @{$o->{default_packages}}, "kernel-pcmcia-cs" if $o->{pcmcia};
	push @{$o->{default_packages}}, "apmd" if $o->{pcmcia};
	push @{$o->{default_packages}}, "raidtools" if $o->{raid} && !is_empty_array_ref($o->{raid}{raid});
	push @{$o->{default_packages}}, "reiserfs-utils" if grep { isReiserfs($_) } @{$o->{fstab}};
	push @{$o->{default_packages}}, "cdrecord" if detect_devices::burners();
	push @{$o->{default_packages}}, "alsa", "alsa-utils" if modules::get_alias("snd-slot-0") =~ /^snd-card-/;

	pkgs::getDeps($o->{prefix}, $o->{packages});
	pkgs::selectPackage($o->{packages}, pkgs::packageByName($o->{packages}, 'basesystem') || die("missing basesystem package"), 1);

	#- some program that may be crazy on some conditions (hack waiting for Aurora to work if no fb).
	$o->{allowFB} && (!detect_devices::matching_desc('Rage LT') &&
			  !detect_devices::matching_desc('SiS') &&
			  !detect_devices::matching_desc('Rage Mobility'))
	  or push @pkgs::skip_list, 'Aurora';

	#- must be done after selecting base packages (to save memory)
	pkgs::getProvides($o->{packages});

	$o->{compss} = pkgs::readCompss($o->{prefix}, $o->{packages});
	#- must be done after getProvides
	$o->{compssListLevels} = pkgs::readCompssList($o->{packages}, lang::get_langs());
	($o->{compssUsers}, $o->{compssUsersSorted}, $o->{compssUsersIcons}, $o->{compssUsersDescr}) = 
	  pkgs::readCompssUsers($o->{packages}, $o->{compss}, $o->{meta_class});

	my @l = ();
	push @l, 'xawtv', 'kwintv' if grep { $_->{driver} eq 'bttv' } detect_devices::probeall();
	push @l, "drakprofile", "draksync", "irda-utils" if $o->{pcmcia};
	push @l, "Glide_V5"  if detect_devices::matching_desc('Voodoo 5');
	push @l, "Glide_V3-DRI"  if detect_devices::matching_desc('Voodoo (3|Banshee)');
	push @l, "Device3Dfx", "XFree86-glide-module" if detect_devices::matching_desc('Voodoo');
	require timezone;
	require lang;
	push @l, "isdn4k-utils" if ($o->{timezone}{timezone} || timezone::bestTimezone(lang::lang2text($o->{lang}))) =~ /Europe/;
	$_->{values} = [ map { $_ + 50 } @{$_->{values}} ] foreach grep {$_} map { pkgs::packageByName($o->{packages}, $_) } @l;

	#- add OpenGL games that are only usefull if a 3D accelerated card is installed.
	my @gl = ();
	if (detect_devices::matching_desc('Matrox.* G[24]00') ||
	    detect_devices::matching_desc('Rage X[CL]') ||
	    detect_devices::matching_desc('Rage Mobility (?:P\/M|L) ') ||
	    detect_devices::matching_desc('3D Rage (?:LT|Pro)') ||
	    detect_devices::matching_desc('Voodoo [35]') ||
	    detect_devices::matching_desc('Voodoo Banshee') ||
	    detect_devices::matching_desc('8281[05].* CGC') ||
	    detect_devices::matching_desc('Rage 128')) {
	    push @gl, "xscreensaver-gl", "Mesa-demos", "xmms-mesa";
	    push @gl, "bzflag" if (!detect_devices::matching_desc('Rage X[CL]') &&
				   !detect_devices::matching_desc('Rage Mobility (?:P\/M|L) ') &&
				   !detect_devices::matching_desc('3D Rage (?:LT|Pro)'));
	    push @gl, "csmash", "gltron" if (!detect_devices::matching_desc('Rage 128')); #- does not work well on transparancy.
	    push @gl, "spacecup", "chromium";
	}
	$_->{values} = [ map { $_ + 60 } @{$_->{values}} ] foreach grep {$_} map { pkgs::packageByName($o->{packages}, $_) } @gl;
    } else {
	#- this has to be done to make sure necessary files for urpmi are
	#- present.
	pkgs::psUpdateHdlistsDeps($o->{prefix}, $o->{method});

	#- remove upgrade flag with selection one. TOCHECK
	#pkgs::unselectAllPackagesIncludingUpgradable($o->{packages});
    }
}

sub addToBeDone(&$) {
    my ($f, $step) = @_;

    return &$f() if $::o->{steps}{$step}{done};

    push @{$::o->{steps}{$step}{toBeDone}}, $f;
}

sub setAuthentication {
    my ($o) = @_;
    my ($shadow, $md5, $nis) = @{$o->{authentication} || {}}{qw(shadow md5 NIS)};
    my $p = $o->{prefix};
    any::enableMD5Shadow($p, $shadow, $md5);
    any::enableShadow($p) if $shadow;
    if ($nis) {
	$o->pkg_install("ypbind");
	my $domain = $o->{netc}{NISDOMAIN};
	$domain || $nis ne "broadcast" or die _("Can't use broadcast with no NIS domain");
	my $t = $domain ? "domain $domain" . ($nis ne "broadcast" && " server")
	                : "ypserver";
	substInFile {
	    $_ = "#~$_" unless /^#/;
	    $_ .= "$t $nis\n" if eof;
	} "$p/etc/yp.conf";
	require network;
	network::write_conf("$p/etc/sysconfig/network", $o->{netc});
    }
}

sub killCardServices {
    my $pid = chop_(cat_("/tmp/cardmgr.pid"));
    $pid and kill(15, $pid); #- send SIGTERM
}

sub hdInstallPath() {
    cat_("/proc/mounts") =~ m|/\w+/(\S+)\s+/tmp/hdimage| or return;
    my ($part) = grep { $_->{device} eq $1 } @{$::o->{fstab}};    
    $part->{mntpoint} or grep { $_->{mntpoint} eq "/mnt/hd" } @{$::o->{fstab}} and return;
    $part->{mntpoint} ||= "/mnt/hd";
    $part->{mntpoint} . first(readlink("/tmp/rhimage") =~ m|^/tmp/hdimage/(.*)|);
}

sub unlockCdrom(;$) {
    my ($cdrom) = @_;
    $cdrom or cat_("/proc/mounts") =~ m|(/tmp/\S+)\s+/tmp/rhimage| and $cdrom = $1;
    $cdrom or cat_("/proc/mounts") =~ m|(/dev/\S+)\s+/mnt/cdrom | and $cdrom = $1;
    eval { $cdrom and ioctl detect_devices::tryOpen($1), c::CDROM_LOCKDOOR(), 0 };
}
sub ejectCdrom(;$) {
    my ($cdrom) = @_;
    $cdrom or cat_("/proc/mounts") =~ m|(/tmp/\S+)\s+/tmp/rhimage| and $cdrom = $1;
    $cdrom or cat_("/proc/mounts") =~ m|(/dev/\S+)\s+/mnt/cdrom | and $cdrom = $1;
    my $f = eval { $cdrom && detect_devices::tryOpen($cdrom) } or return;
    getFile("XXX"); #- close still opened filehandle
    eval { fs::umount("/tmp/rhimage") };
    ioctl $f, c::CDROMEJECT(), 1;
}

sub setupFB {
    my ($o, $vga) = @_;

    $vga ||= 785; #- assume at least 640x480x16.

    require bootloader;
    #- update bootloader entries with vga, all kernel are now framebuffer.
    foreach (qw(vmlinuz vmlinuz-secure vmlinuz-smp vmlinuz-hack)) {
	if (my $e = bootloader::get("/boot/$_", $o->{bootloader})) {
	    $e->{vga} = $vga;
	}
    }
    bootloader::install($o->{prefix}, $o->{bootloader}, $o->{fstab}, $o->{hds});
    1;
}

sub install_urpmi {
    my ($prefix, $method, $mediums) = @_;

    my @cfg = map_index {
	my $name = $_->{fakemedium};

	local *LIST;
	open LIST, ">$prefix/var/lib/urpmi/list.$name" or log::l("failed to write list.$name"), return;

	my $dir = ${{ nfs => "file://mnt/nfs", 
                      hd => "file:/" . hdInstallPath(),
		      ftp => $ENV{URLPREFIX},
		      http => $ENV{URLPREFIX},
		      cdrom => "removable_cdrom_$::i://mnt/cdrom" }}{$method} . "/$_->{rpmsdir}";

	local *FILES; open FILES, "packdrake -c /tmp/$_->{hdlist} | parsehdlist - |";
	chop, print LIST "$dir/$_\n" foreach <FILES>;
	close FILES or log::l("parsehdlist failed"), return;
	close LIST;

	$dir .= " with ../base/$_->{hdlist}" if $method =~ /ftp|http/;
	"$name $dir\n";
    } values %$mediums;
    eval { output "$prefix/etc/urpmi/urpmi.cfg", @cfg };
}


#-###############################################################################
#- kde stuff
#-###############################################################################
sub kderc_largedisplay {
    my ($prefix) = @_;

    update_userkderc($prefix, 'KDE', 
		     Contrast => 7,
		     kfmIconStyle => "Large",
		     kpanelIconStyle => "Normal", #- to change to Large when icons looks better
		     KDEIconStyle => "Large");
    substInFile {
	s/^(GridWidth)=85/$1=100/;
	s/^(GridHeight)=70/$1=75/;
    } $_ foreach list_skels($prefix, '.kde/share/config/kfmrc');
}

sub kdeicons_postinstall {
    my ($prefix) = @_;

    #- parse etc/fstab file to search for dos/win, floppy, zip, cdroms icons.
    #- handle both supermount and fsdev usage.
    my %l = (
	     'cdrom' => [ 'cdrom', 'Cd-Rom' ],
	     'zip' => [ 'zip', 'Zip' ],
	     'floppy-ls' => [ 'floppy', 'LS-120' ],
	     'floppy' => [ 'floppy', 'Floppy' ],
    );
    foreach (fs::read_fstab("$prefix/etc/fstab")) {

	my ($name_, $nb) = $_->{mntpoint} =~ m|.*/(\S+?)(\d*)$/|;
	my ($name, $text) = @{$l{$name_} || []};

	my $f = ${{
	    supermount => sub { $name .= '.fsdev' if $name },
	    vfat => sub { $name = 'Dos_'; $text = $name_ },
	}}{$_->{type}};
	&$f if $f;

	template2userfile($prefix, 
			  "$ENV{SHARE_PATH}/$name.kdelnk.in",
			  "Desktop/$text" .  ($nb && " $nb"). ".kdelnk",
			  1, %$_) if $name;
    }

    my @l = list_skels($prefix, 'Desktop/Doc.kdelnk');
    if (my ($lang) = all("$prefix/usr/doc/mandrake")) {
	substInFile { s|^(URL=.*?)/?$|$1/$lang/index.html| } @l;
	substInFile { s|^(url=/usr/doc/mandrake/)$|$1$lang/index.html| } "$prefix/usr/lib/desktop-links/mandrake.links";
    } else {
	unlink @l;
	substInFile { $_ = '' if /^\[MDKsupport\]$/ .. /^\s*$/ } "$prefix/usr/lib/desktop-links/mandrake.links";
    }

    # rename the .kdelnk to the name found in the .kdelnk as kde doesn't use it
    # for displaying
    foreach my $dir (grep { -d $_ } list_skels($prefix, 'Desktop')) {
	foreach (grep { /\.kdelnk$/ } all($dir)) {
	    cat_("$dir/$_") =~ /^Name\[\Q$ENV{LANG}\E\]=(.{2,14})$/m
	      and rename "$dir/$_", "$dir/$1.kdelnk";
	}
    }
}

sub kdemove_desktop_file {
    my ($prefix) = @_;
    my @toMove = qw(doc.kdelnk news.kdelnk updates.kdelnk home.kdelnk printer.kdelnk floppy.kdelnk cdrom.kdelnk FLOPPY.kdelnk CDROM.kdelnk);

    #- remove any existing save in Trash of each user and
    #- move appropriate file there after an upgrade.
    foreach my $dir (grep { -d $_ } list_skels($prefix, 'Desktop')) {
	unlink("$dir/Trash/$_") && rename("$dir/$_", "$dir/Trash/$_")
	    foreach grep { -e "$dir/$_" } @toMove, grep { /\.rpmorig$/ } all($dir)
    }
}


#-###############################################################################
#- auto_install stuff
#-###############################################################################
sub auto_inst_file() { ($::g_auto_install ? "/tmp" : "$::o->{prefix}/root") . "/auto_inst.cfg.pl" }

sub g_auto_install(;$) {
    my ($f) = @_; $f ||= auto_inst_file;
    my $o = {};

    require pkgs;
    $o->{default_packages} = [ map { pkgs::packageName($_) } grep { pkgs::packageFlagSelected($_) && !pkgs::packageFlagBase($_) } values %{$::o->{packages}[0]} ];

    my @fields = qw(mntpoint type size);
    $o->{partitions} = [ map { my %l; @l{@fields} = @$_{@fields}; \%l } grep { $_->{mntpoint} } @{$::o->{fstab}} ];
    
    exists $::o->{$_} and $o->{$_} = $::o->{$_} foreach qw(lang autoSCSI authentication printer mouse wacom netc timezone superuser intf keyboard mkbootdisk users installClass partitioning isUpgrade manualFstab nomouseprobe crypto security netcnx useSupermount autoExitInstall); #- TODO modules bootloader 

    if (my $card = $::o->{X}{card}) {
	$o->{X}{$_} = $::o->{X}{$_} foreach qw(default_depth resolution_wanted);
	if ($o->{X}{default_depth} and my $depth = $card->{depth}{$o->{X}{default_depth}}) {
	    $depth ||= [];
	    $o->{X}{resolution_wanted} ||= join "x", @{$depth->[0]} unless is_empty_array_ref($depth->[0]);
	    $o->{X}{monitor} = $::o->{X}{monitor} if $::o->{X}{monitor}{manual};
	}
    }

    local $o->{partitioning}{auto_allocate} = 1;
    local $o->{autoExitInstall} = 1;

    $_ = { %{$_ || {}} }, delete @$_{qw(oldu oldg password password2)} foreach $o->{superuser}, @{$o->{users} || []};
    
    output($f, 
	   "# You should always check the syntax with 'perl -cw auto_inst.cfg.pl' before testing\n",
	   Data::Dumper->Dump([$o], ['$o']), "\0");
}

sub loadO {
    my ($O, $f) = @_; $f ||= auto_inst_file;
    my $o;
    if ($f =~ /^(floppy|patch)$/) {
	my $f = $f eq "floppy" ? 'Mandrake/base/auto_inst.cfg' : "patch";
	unless ($::testing) {
	    fs::mount(devices::make(detect_devices::floppy()), "/mnt", (arch() =~ /sparc/ ? "romfs" : "vfat"), 'readonly');
	    $f = "/mnt/$f";
	}
	-e $f or $f .= '.pl';

	my $b = before_leaving {
	    fs::umount("/mnt") unless $::testing;
	    modules::unload($_) foreach qw(vfat fat);
	};
	$o = loadO($O, $f);
    } else {
	-e "$f.pl" and $f .= ".pl" unless -e $f;

	my $fh = -e $f ? do { local *F; open F, $f; *F } : getFile($f) or die _("Error reading file $f");
	{
	    local $/ = "\0";
	    no strict;
	    eval <$fh>;
	    close $fh;
	    $@ and log::l("Bad kickstart file $f (failed $@)");
	}
	add2hash_($o ||= {}, $O);
    }
    bless $o, ref $O;
}

sub generate_ks_cfg {
    my ($o) = @_;
    
    return if $o->{method} =~ /hd|cdrom/;

    my $ks;
    if ($o->{method} =~ /ftp|http/) {
	$ks .= "url --url $ENV{URLPREFIX}\n";
    } elsif ($o->{method} =~ /nfs/) {
	cat_("/proc/mounts") =~ m|(\S+):(\S+)\s+/tmp/rhimage nfs| or die;
	$ks .= "nfs --server $1 --dir $2\n";
    }
    my ($intf) = values %{$o->{intf}};