1 files changed, 23 insertions, 95 deletions
@@ -1,7 +1,6 @@ -# translation of DrakX-sv.po to -# DrakX-sv - Swedish Translation +# translation of DrakX-sv.po to Swedish # -# Copyright (C) 2000,2002,2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 2000,2002,2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # Copyright (c) 2000 Mandriva # # Kenneth Krekula, 2005. @@ -10,16 +9,16 @@ # Mattias Newzella <newzella@linux.nu>, 2001, 2002,2003. # Magnus Björklöf <bjorklof@nic.fi>, 2003. # Lars Westergren <lars.westergren@home.se>, 2003, 2004, 2005. -# Thomas Backlund <tmb@mandriva.org>, 2004, 2005, 2006. +# Thomas Backlund <tmb@mandriva.org>, 2004, 2005, 2006, 2008. # Kenneth Krekula <kenneth.krekula@kiruna.se>, 2007. msgid "" msgstr "" "Project-Id-Version: DrakX-sv\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-01-17 14:35+0100\n" -"PO-Revision-Date: 2007-03-18 12:05+0100\n" -"Last-Translator: Kenneth Krekula <kenneth.krekula@kiruna.se>\n" -"Language-Team: <sv@li.org>\n" +"PO-Revision-Date: 2008-02-27 17:07+0200\n" +"Last-Translator: Thomas Backlund <tmb@mandriva.org>\n" +"Language-Team: Swedish <sv@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -78,8 +77,7 @@ msgstr "URL måste starta med ftp:// eller http://" #: any.pm:228 #, c-format -msgid "" -"Contacting Mandriva Linux web site to get the list of available mirrors..." +msgid "Contacting Mandriva Linux web site to get the list of available mirrors..." msgstr "" "Kontaktar Mandriva Linux webbplats för att hämta listan över tillgängliga " "speglar..." @@ -343,6 +341,8 @@ msgid "" "Some packages requested by %s cannot be installed:\n" "%s" msgstr "" +"Vissa paket som krävs av %s kan inte installeras:\n" +"%s" #: share/meta-task/compssUsers.pl:11 #, c-format @@ -611,8 +611,7 @@ msgstr "Gnome-arbetsstation" msgid "" "A graphical environment with user-friendly set of applications and desktop " "tools" -msgstr "" -"Grafisk miljö med en samling användarvänliga program och skrivbordsverktyg" +msgstr "Grafisk miljö med en samling användarvänliga program och skrivbordsverktyg" #: share/meta-task/compssUsers.pl:142 #, c-format @@ -709,7 +708,7 @@ msgstr "<Tab>/<Alt-Tab> mellan element" #: steps_gtk.pm:82 #, c-format msgid "Xorg server is slow to start. Please wait..." -msgstr "" +msgstr "Xorg server är långsam i starten. Vänta..." #: steps_gtk.pm:192 #, c-format @@ -875,9 +874,9 @@ msgid "Time remaining " msgstr "Återstående tid " #: steps_gtk.pm:518 -#, fuzzy, c-format +#, c-format msgid "(estimating...)" -msgstr "Uppskattar" +msgstr "(uppskattar...)" #: steps_gtk.pm:545 #, c-format @@ -954,7 +953,7 @@ msgid "Is this an install or an upgrade?" msgstr "Är detta en installation eller en uppdatering?" #: steps_interactive.pm:134 -#, fuzzy, c-format +#, c-format msgid "" "_: This is a noun:\n" "Install" @@ -968,12 +967,12 @@ msgstr "Uppdatera %s" #: steps_interactive.pm:140 #, c-format msgid "Upgrade from a 32bit to a 64bit distribution is not supported" -msgstr "" +msgstr "Uppgradering från en 32bit till en 64bit distribution stöds inte." #: steps_interactive.pm:144 #, c-format msgid "Upgrade from a 64bit to a 32bit distribution is not supported" -msgstr "" +msgstr "Uppgradering från en 64bit till en 32bit distribution stöds inte." #: steps_interactive.pm:158 #, c-format @@ -1064,22 +1063,22 @@ msgstr "Oanvändbar fil" #: steps_interactive.pm:431 #, c-format msgid "Install Mandriva KDE Desktop" -msgstr "" +msgstr "Installera Mandriva KDE Skrivbordsmiljö" #: steps_interactive.pm:432 #, c-format msgid "Install Mandriva GNOME Desktop" -msgstr "" +msgstr "Installera Mandriva GNOME Skrivbordsmiljö" #: steps_interactive.pm:433 -#, fuzzy, c-format +#, c-format msgid "Custom install" -msgstr "Minimal installation" +msgstr "Anpassad installation" #: steps_interactive.pm:436 #, c-format msgid "You can choose your workstation desktop profile: KDE, GNOME or Custom" -msgstr "" +msgstr "Du kan väja din arbetsstationsprofil: KDE, GNOME eller Anpassad" #: steps_interactive.pm:521 #, c-format @@ -1199,8 +1198,7 @@ msgstr "" #: steps_interactive.pm:714 #, c-format msgid "Contacting the mirror to get the list of available packages..." -msgstr "" -"Kontaktar webbplatsen för att hämta en lista över tillgängliga paket..." +msgstr "Kontaktar webbplatsen för att hämta en lista över tillgängliga paket..." #: steps_interactive.pm:720 #, c-format @@ -1406,7 +1404,7 @@ msgstr "Välj språk" #: steps_list.pm:16 steps_list.pm:23 #, c-format msgid "Localization" -msgstr "" +msgstr "Lokalisering" #: steps_list.pm:17 #, c-format @@ -1534,73 +1532,3 @@ msgid "" "Exit" msgstr "Avsluta" -#~ msgid "All" -#~ msgstr "Alla" - -#~ msgid "TV card" -#~ msgstr "Tv-kort" - -#~ msgid "Boot" -#~ msgstr "Starta" - -#~ msgid "" -#~ "_: Keep these entry short\n" -#~ "Authentication" -#~ msgstr "Autentisering" - -#~ msgid "Arkeia" -#~ msgstr "Arkeia" - -#~ msgid "Flatout" -#~ msgstr "Flatout" - -#~ msgid "Gwenview" -#~ msgstr "Gwenview" - -#~ msgid "3D" -#~ msgstr "3D" - -#~ msgid "CMS" -#~ msgstr "CMS" - -#~ msgid "CRM" -#~ msgstr "CRM" - -#~ msgid "2007 product line" -#~ msgstr "2007 produktlinje" - -#~ msgid "Invictus Firewall" -#~ msgstr "Invictus Brandvägg" - -#~ msgid "Discovery Live Mode" -#~ msgstr "Discovery Live Läge" - -#~ msgid "How to register" -#~ msgstr "Hur registrera dig" - -#~ msgid "Rpmdrake 2" -#~ msgstr "Rpmdrake 2" - -#~ msgid "Mandriva Online Services" -#~ msgstr "Mandriva Online Tjänster" - -#~ msgid "New Theme" -#~ msgstr "Nytt Tema" - -#~ msgid "Web 2.0" -#~ msgstr "Web 2.0" - -#~ msgid "Kaspersky" -#~ msgstr "Kaspersky" - -#~ msgid "LinDVD" -#~ msgstr "LinDVD" - -#~ msgid "Skype" -#~ msgstr "Skype" - -#~ msgid "Transgaming/Cedega" -#~ msgstr "Transgaming/Cedega" - -#~ msgid "DrakVPN" -#~ msgstr "DrakVPN" |
415'>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
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
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
package install_steps_interactive;
use diagnostics;
use strict;
use vars qw(@ISA);
@ISA = qw(install_steps);
#-######################################################################################
#- misc imports
#-######################################################################################
use common qw(:common :file :functional :system);
use partition_table qw(:types);
use partition_table_raw;
use install_steps;
use install_interactive;
use install_any;
use detect_devices;
use netconnect;
use run_program;
use commands;
use devices;
use fsedit;
use network;
use raid;
use mouse;
use modules;
use lang;
use loopback;
use keyboard;
use any;
use fs;
use log;
#-######################################################################################
#- In/Out Steps Functions
#-######################################################################################
sub errorInStep($$) {
my ($o, $err) = @_;
$err =~ s/ at .*?$/\./ unless $::testing; #- avoid error message.
$o->ask_warn(_("Error"), [ _("An error occurred"), $err ]);
}
sub kill_action {
my ($o) = @_;
$o->kill;
}
#-######################################################################################
#- Steps Functions
#-######################################################################################
#------------------------------------------------------------------------------
sub selectLanguage($) {
my ($o) = @_;
$o->{lang} = $o->ask_from_listf("Language",
_("Please, choose a language to use."),
\&lang::lang2text,
[ lang::list() ],
$o->{lang});
install_steps::selectLanguage($o);
$o->ask_warn('',
"If you see this message it is because you choose a language for which
DrakX does not include a translation yet; however the fact that it is
listed means there is some support for it anyway. That is, once GNU/Linux
will be installed, you will be able to at least read and write in that
language; and possibly more (various fonts, spell checkers, various programs
translated etc. that varies from language to language).") if $o->{lang} !~ /^en/ && translate("_I18N_");
#- $o->{useless_thing_accepted} = $o->ask_from_list_('',
#-"Warning no warranty",
#- [ __("Accept"), __("Refuse") ], "Accept") eq "Accept" or _exit(1) unless $o->{useless_thing_accepted};
}
#------------------------------------------------------------------------------
sub selectKeyboard($) {
my ($o, $clicked) = @_;
$o->{keyboard} = $o->ask_from_listf_(_("Keyboard"),
_("Please, choose your keyboard layout."),
\&keyboard::keyboard2text,
[ keyboard::xmodmaps() ],
$o->{keyboard});
delete $o->{keyboard_unsafe};
if ($::expert && ref($o) !~ /newt/) { #- newt is buggy with big windows :-(
my %langs; $langs{$_} = 1 foreach @{$o->{langs}};
$o->ask_many_from_list_ref('',
_("You can choose other languages that will be available after install"),
[ (map { lang::lang2text($_) } lang::list()), 'All' ], [ map { \$langs{$_} } lang::list(), 'all' ] ) or goto &selectKeyboard;
$o->{langs} = $langs{all} ? [ 'all' ] : [ grep { $langs{$_} } keys %langs ];
}
install_steps::selectKeyboard($o);
}
#------------------------------------------------------------------------------
sub selectInstallClass1 {
my ($o, $verif, $l, $def, $l2, $def2) = @_;
$verif->($o->ask_from_list(_("Install Class"), _("Which installation class do you want?"), $l, $def));
$o->ask_from_list_(_("Install/Rescue"), _("Is this an install or a rescue?"), $l2, $def2);
}
#------------------------------------------------------------------------------
sub selectInstallClass($@) {
my ($o, @classes) = @_;
my %c = my @c = (
$::corporate ? () : (
_("Recommended") => "beginner",
),
_("Customized") => "specific",
_("Expert") => "expert",
);
$o->set_help('selectInstallClassCorpo') if $::corporate;
my $verifInstallClass = sub {
$::beginner = $c{$_[0]} eq "beginner";
$::expert = $c{$_[0]} eq "expert" &&
$o->ask_from_list_('',
_("Are you sure you are an expert?
You will be allowed to make powerful but dangerous things here.
You will be asked questions such as: ``Use shadow file for passwords?'',
are you ready to answer that kind of questions?"),
[ _("Customized"), _("Expert") ]) ne "Customized";
};
$o->{isUpgrade} = $o->selectInstallClass1($verifInstallClass,
first(list2kv(@c)), ${{reverse %c}}{$::beginner ? "beginner" : $::expert ? "expert" : "specific"},
[ __("Install"), __("Rescue") ], $o->{isUpgrade} ? "Rescue" : "Install") eq "Rescue";
if ($::corporate || $::beginner) {
delete $o->{installClass};
} else {
my %c = (
normal => _("Workstation"),
developer => _("Development"),
server => _("Server"),
);
$o->set_help('selectInstallClass2');
$o->{installClass} = $o->ask_from_listf(_("Install Class"),
_("Which usage is your system used for ?"),
sub { $c{$_[0]} },
[ keys %c ],
$o->{installClass});
}
install_steps::selectInstallClass($o);
}
#------------------------------------------------------------------------------
sub selectMouse {
my ($o, $force) = @_;
$force ||= $o->{mouse}{unsafe} || $::expert;
$o->{mouse} = $o->ask_from_listf_('', _("Please, choose the type of your mouse."),
sub { $_[0]{FULLNAME} }, [ mouse::list ], $o->{mouse}) if $force;
$o->{mouse}{XEMU3} = 'yes' if $o->{mouse}{nbuttons} < 3;
if ($force && $o->{mouse}{device} eq "ttyS") {
$o->set_help('selectSerialPort');
$o->{mouse}{device} =
$o->ask_from_listf(_("Mouse Port"),
_("Please choose on which serial port your mouse is connected to."),
\&mouse::serial_port2text,
[ mouse::serial_ports ]);
}
any::setup_thiskind($o, 'usb', !$::expert, 0, $o->{pcmcia}) if $o->{mouse}{device} eq "usbmouse";
eval {
devices::make("usbmouse");
modules::load("usbmouse");
modules::load("mousedev");
} if $o->{mouse}{device} eq "usbmouse";
$o->SUPER::selectMouse;
}
#------------------------------------------------------------------------------
sub setupSCSI {
my ($o) = @_;
{
my $w = $o->wait_message(_("IDE"), _("Configuring IDE"));
modules::load_ide();
}
any::setup_thiskind($o, 'scsi|disk', $_[1], $_[2], $o->{pcmcia});
}
sub ask_mntpoint_s {
my ($o, $fstab) = @_;
my @fstab = grep { isTrueFS($_) } @$fstab;
@fstab = grep { isSwap($_) } @$fstab if @fstab == 0;
@fstab = @$fstab if @fstab == 0;
die _("no available partitions") if @fstab == 0;
if (@fstab == 1) {
$fstab[0]{mntpoint} = '/';
} else {
install_any::suggest_mount_points($o->{hds}, $o->{prefix}, 'uniq');
log::l("default mntpoint $_->{mntpoint}") foreach @fstab;
$o->ask_from_entries_refH('',
_("Choose the mount points"),
[ map { partition_table_raw::description($_) =>
{ val => \$_->{mntpoint}, not_edit => 0, list => [ '', fsedit::suggestions_mntpoint([]) ] }
} @fstab ]) or return;
}
$o->SUPER::ask_mntpoint_s($fstab);
}
#------------------------------------------------------------------------------
sub doPartitionDisks {
my ($o) = @_;
my $warned;
install_any::getHds($o, sub {
my ($err) = @_;
$warned = 1;
if ($o->ask_yesorno(_("Error"),
_("I can't read your partition table, it's too corrupted for me :(
I can try to go on blanking bad partitions (ALL DATA will be lost!).
The other solution is to disallow DrakX to modify the partition table.
(the error is %s)
Do you agree to loose all the partitions?
", $err))) {
0;
} else {
$o->{partitioning}{readonly} = 1;
1;
}
}) or $warned or $o->ask_warn('',
_("DiskDrake failed to read correctly the partition table.
Continue at your own risk!"));
if ($o->{isUpgrade}) {
# either one root is defined (and all is ok), or we take the first one we find
my $p =
fsedit::get_root($o->{fstab}) ||
$o->ask_from_listf(_("Root Partition"),
_("What is the root partition (/) of your system?"),
\&partition_table_raw::description,
[ install_any::find_root_parts($o->{hds}, $o->{prefix}) ]) or die "setstep exitInstall\n";
install_any::use_root_part($o->{fstab}, $p, $o->{prefix});
} elsif ($::expert) {
install_interactive::partition_with_diskdrake($o, $o->{hds});
} else {
install_interactive::partitionWizard($o);
}
}
#------------------------------------------------------------------------------
sub rebootNeeded($) {
my ($o) = @_;
$o->ask_warn('', _("You need to reboot for the partition table modifications to take place"));
install_steps::rebootNeeded($o);
}
#------------------------------------------------------------------------------
sub choosePartitionsToFormat($$) {
my ($o, $fstab) = @_;
$o->SUPER::choosePartitionsToFormat($fstab);
my @l = grep { !$_->{isFormatted} && $_->{mntpoint} && !($::beginner && isSwap($_)) &&
(!isOtherAvailableFS($_) || $::expert || $_->{toFormat})
} @$fstab;
$_->{toFormat} = 1 foreach grep { $::beginner && isSwap($_) } @$fstab;
return if $::beginner && 0 == grep { ! $_->{toFormat} } @l;
$_->{toFormat} ||= $_->{toFormatUnsure} foreach @l;
log::l("preparing to format $_->{mntpoint}") foreach grep { $_->{toFormat} } @l;
my %label;
$label{$_} = sprintf("%s (%s)",
isSwap($_) ? type2name($_->{type}) : $_->{mntpoint},
isLoopback($_) ? loopback::file($_) : $_->{device}) foreach @l;
$o->ask_many_from_list_ref('', _("Choose the partitions you want to format"),
[ map { $label{$_} } @l ],
[ map { \$_->{toFormat} } @l ]) or die "cancel";
@l = grep { $_->{toFormat} && !isLoopback($_) && !isReiserfs($_) } @l;
$o->ask_many_from_list_ref('', _("Check bad blocks?"),
[ map { $label{$_} } @l ],
[ map { \$_->{toFormatCheck} } @l ]) or goto &choosePartitionsToFormat if $::expert;
}
sub formatMountPartitions {
my ($o, $fstab) = @_;
my $w = $o->wait_message('', _("Formatting partitions"));
fs::formatMount_all($o->{raid}, $o->{fstab}, $o->{prefix}, sub {
my ($part) = @_;
$w->set(isLoopback($part) ?
_("Creating and formatting file %s", loopback::file($part)) :
_("Formatting partition %s", $part->{device}));
});
die _("Not enough swap to fulfill installation, please add some") if availableMemory < 40 * 1024;
}
#------------------------------------------------------------------------------
sub setPackages {
my ($o) = @_;
my $w = $o->wait_message('', _("Looking for available packages"));
$o->SUPER::setPackages;
}
#------------------------------------------------------------------------------
sub selectPackagesToUpgrade {
my ($o) = @_;
my $w = $o->wait_message('', _("Finding packages to upgrade"));
$o->SUPER::selectPackagesToUpgrade();
}
#------------------------------------------------------------------------------
sub choosePackages {
my ($o, $packages, $compss, $compssUsers, $compssUsersSorted, $first_time) = @_;
#- this is done at the very beginning to take into account
#- selection of CD by user if using a cdrom.
$o->chooseCD($packages) if $o->{method} eq 'cdrom';
my $availableC = install_steps::choosePackages(@_);
my $individual = $::expert;
require pkgs;
my $min_size = pkgs::selectedSize($packages);
$min_size < $availableC or die _("Your system has not enough space left for installation or upgrade (%d > %d)", $min_size, $availableC);
$o->chooseGroups($packages, $compssUsers, $compssUsersSorted, \$individual) unless $::beginner || $::corporate;
#- avoid reselection of package if individual selection is requested and this is not the first time.
if (1 || $first_time || !$individual) {
my $min_mark = $::beginner ? 10 : $::expert ? 0 : 1;
my ($size, $level) = pkgs::fakeSetSelectedFromCompssList($o->{compssListLevels}, $packages, $min_mark, 0, $o->{installClass});
my $max_size = 1 + $size; #- avoid division by zero.
my $size2install = min($availableC, do {
if ($::beginner) {
my @l = (300, 700, round_up(min($max_size, $availableC) / sqr(1024), 100));
$l[2] > $l[1] + 200 or splice(@l, 1, 1); #- not worth proposing too alike stuff
$l[1] > $l[0] + 100 or splice(@l, 0, 1);
my @text = (__("Minimum (%dMB)"), __("Recommended (%dMB)"), __("Complete (%dMB)"));
$o->ask_from_listf('', _("Select the size you want to install"), sub { _ ($text[$_[1]], $_[0]) }, \@l) * sqr(1024);
} else {
$o->chooseSizeToInstall($packages, $min_size, $max_size, $availableC, $individual) || goto &choosePackages;
}
});
($o->{packages_}{ind}) =
pkgs::setSelectedFromCompssList($o->{compssListLevels}, $packages, $min_mark, $size2install, $o->{installClass});
}
$o->choosePackagesTree($packages, $compss) if $individual;
}
sub chooseSizeToInstall {
my ($o, $packages, $min, $max, $availableC) = @_;
$availableC * 0.7;
}
sub choosePackagesTree {}
sub chooseGroups {
my ($o, $packages, $compssUsers, $compssUsersSorted, $individual) = @_;
$o->ask_many_from_list_ref('',
_("Package Group Selection"),
[ @$compssUsersSorted, _("Miscellaneous") ],
[ map { \$o->{compssUsersChoice}{$_} } @$compssUsersSorted, "Miscellaneous" ],
[ _("Individual package selection") ], [ $individual ],
) or goto &chooseGroups;
unless ($o->{compssUsersChoice}{Miscellaneous}) {
my %l;
$l{@{$compssUsers->{$_}}} = () foreach @$compssUsersSorted;
exists $l{$_} or pkgs::packageSetFlagSkip($_, 1) foreach values %{$packages->[0]};
}
foreach (@$compssUsersSorted) {
$o->{compssUsersChoice}{$_} or pkgs::skipSetWithProvides($packages, @{$compssUsers->{$_}});
}
foreach (@$compssUsersSorted) {
$o->{compssUsersChoice}{$_} or next;
foreach (@{$compssUsers->{$_}}) {
pkgs::packageSetFlagUnskip($_, 1);
pkgs::packageSetFlagSkip($_, 0);
}
}
}
sub chooseCD {
my ($o, $packages) = @_;
my @mediums = grep { $_ > 1 } pkgs::allMediums($packages);
my @mediumsDescr = ();
my %mediumsDescr = ();
unless (grep { /ram3/ } cat_("/proc/mounts")) {
#- mono-cd in case of no ramdisk
undef $packages->[2]{$_}{selected} foreach @mediums;
return;
}
#- if no other medium available or a poor beginner, we are choosing for him!
#- note first CD is always selected and should not be unselected!
return if scalar(@mediums) == 0 || $::beginner;
#- build mediumDescr according to mediums, this avoid asking multiple times
#- all the medium grouped together on only one CD.
foreach (@mediums) {
my $descr = pkgs::mediumDescr($packages, $_);
exists $mediumsDescr{$descr} or push @mediumsDescr, $descr;
$mediumsDescr{$descr} ||= $packages->[2]{$_}{selected};
}
$o->set_help('chooseCD');
$o->ask_many_from_list_ref('',
_("If you have all the CDs in the list below, click Ok.
If you have none of those CDs, click Cancel.
If only some CDs are missing, unselect them, then click Ok."),
[ map { _("Cd-Rom labeled \"%s\"", $_) } @mediumsDescr ],
[ map { \$mediumsDescr{$_} } @mediumsDescr ]
) or do {
map { $mediumsDescr{$_} = 0 } @mediumsDescr; #- force unselection of other CDs.
};
$o->set_help('choosePackages');
#- restore true selection of medium (which may have been grouped together)
foreach (@mediums) {
my $descr = pkgs::mediumDescr($packages, $_);
$packages->[2]{$_}{selected} = $mediumsDescr{$descr};
}
}
#------------------------------------------------------------------------------
sub installPackages {
my ($o, $packages) = @_;
my ($current, $total) = 0;
my $w = $o->wait_message(_("Installing"), _("Preparing installation"));
my $old = \&pkgs::installCallback;
local *pkgs::installCallback = sub {
my $m = shift;
if ($m =~ /^Starting installation/) {
$total = $_[1];
} elsif ($m =~ /^Starting installing package/) {
my $name = $_[0];
$w->set(_("Installing package %s\n%d%%", $name, $total && 100 * $current / $total));
$current += pkgs::packageSize(pkgs::packageByName($o->{packages}, $name));
} else { unshift @_, $m; goto $old }
};
$o->SUPER::installPackages($packages);
}
sub afterInstallPackages($) {
my ($o) = @_;
my $w = $o->wait_message('', _("Post-install configuration"));
$o->SUPER::afterInstallPackages($o);
}
#------------------------------------------------------------------------------
sub configureNetwork {
my ($o, $first_time) = @_;
$o->{netcnx}||={};
netconnect::net_connect($o->{prefix}, $o->{netcnx}, $o->{netc}, $o->{modem}, $o->{mouse}, $o, $o->{pcmcia}, $o->{intf}, $first_time);
}
#-configureNetworkIntf moved to network
#-configureNetworkNet moved to network
#------------------------------------------------------------------------------
#-pppConfig moved to any.pm
#------------------------------------------------------------------------------
sub installCrypto {
my ($o) = @_;
my $u = $o->{crypto} ||= {};
$::expert and $o->hasNetwork or return;
is_empty_hash_ref($u) and $o->ask_yesorno('',
_("You have now the possibility to download software aimed for encryption.
WARNING:
Due to different general requirements applicable to these software and imposed
by various jurisdictions, customer and/or end user of theses software should
ensure that the laws of his/their jurisdiction allow him/them to download, stock
and/or use these software.
In addition customer and/or end user shall particularly be aware to not infringe
the laws of his/their jurisdiction. Should customer and/or end user not
respect the provision of these applicable laws, he/they will incure serious
sanctions.
In no event shall Mandrakesoft nor its manufacturers and/or suppliers be liable
for special, indirect or incidental damages whatsoever (including, but not
limited to loss of profits, business interruption, loss of commercial data and
other pecuniary losses, and eventual liabilities and indemnification to be paid
pursuant to a court decision) arising out of use, possession, or the sole
downloading of these software, to which customer and/or end user could
eventually have access after having sign up the present agreement.
For any queries relating to these agreement, please contact
Mandrakesoft, Inc.
2400 N. Lincoln Avenue Suite 243
Altadena California 91001
USA")) || return;
require crypto;
eval {
$u->{mirror} = $o->ask_from_listf('', _("Choose a mirror from which to get the packages"), \&crypto::mirror2text, [ crypto::mirrors() ], $u->{mirror});
};
return if $@;
#- bring all interface up for installing crypto packages.
install_interactive::upNetwork($o);
my @packages = do {
my $w = $o->wait_message('', _("Contacting the mirror to get the list of available packages"));
crypto::getPackages($o->{prefix}, $o->{packages}, $u->{mirror}); #- make sure $o->{packages} is defined when testing
};
my %h; $h{$_} = 1 foreach @{$u->{packages} || []};
$o->ask_many_from_list_ref('', _("Please choose the packages you want to install."),
\@packages, [ map { \$h{$_} } @packages ]) or return;
$o->pkg_install(@{$u->{packages} = [ grep { $h{$_} } @packages ]});
#- stop interface using ppp only.
install_interactive::downNetwork($o, 'pppOnly');
}
#------------------------------------------------------------------------------
sub configureTimezone {
my ($o, $f, $clicked) = @_;
require timezone;
$o->{timezone}{timezone} = $o->ask_from_treelist('', _("Which is your timezone?"), '/', [ timezone::getTimeZones($::g_auto_install ? '' : $o->{prefix}) ], $o->{timezone}{timezone});
$o->{timezone}{UTC} = $o->ask_yesorno('', _("Is your hardware clock set to GMT?"), $o->{timezone}{UTC}) if $::expert || $clicked;
install_steps::configureTimezone($o, $f);
}
#------------------------------------------------------------------------------
sub configureServices {
my ($o) = @_;
require services;
$o->{services} = services::ask($o, $o->{prefix});
install_steps::configureServices($o);
}
#------------------------------------------------------------------------------
sub configurePrinter {
my ($o, $clicked) = @_;
$::corporate and return;
require printer;
require printerdrake;
if ($::beginner && !$clicked) {
printerdrake::auto_detect($o) or return;
}
#- bring interface up for installing ethernet packages but avoid ppp by default,
#- else the guy know what he is doing...
#install_interactive::upNetwork($o, 'pppAvoided');
#- take default configuration, this include choosing the right system
#- currently used by the system.
eval { add2hash($o->{printer} ||= {}, printer::getinfo($o->{prefix})) };
#- figure out what printing system to use, currently are suported cups and lpr,
#- in case this has not be detected above.
$::beginner and $o->{printer}{mode} ||= 'cups';
if ($::expert || !$o->{printer}{mode}) {
$o->{printer}{mode} = $o->ask_from_list_([''], _("What printing system do you want to use?"),
[ 'cups', 'lpr', __("Cancel") ],
);
$o->{printer}{want} = $o->{printer}{mode} ne 'Cancel';
$o->{printer}{want} or $o->{printer}{mode} = undef, return;
}
$o->{printer}{PAPERSIZE} = $o->{lang} eq 'en' ? 'letter' : 'a4';
printerdrake::main($o->{printer}, $o, sub { $o->pkg_install(@_) }, sub { install_interactive::upNetwork($o, 'pppAvoided') });
$o->pkg_install_if_requires_satisfied('xpp', 'kups');
}
#------------------------------------------------------------------------------
sub setRootPassword {
my ($o, $clicked) = @_;
my $sup = $o->{superuser} ||= {};
my $nis = $o->{authentication}{NIS};
$sup->{password2} ||= $sup->{password} ||= "";
return if $o->{security} < 1 && !$clicked;
$o->set_help("setRootPassword",
$o->{installClass} =~ "server" || $::expert ? "setRootPasswordMd5" : (),
$::beginner ? () : "setRootPasswordNIS");
$o->ask_from_entries_refH([_("Set root password"), _("Ok"), $o->{security} > 2 || $::corporate ? () : _("No password")],
[ _("Set root password"), "\n" ], [
_("Password") => { val => \$sup->{password}, hidden => 1 },
_("Password (again)") => { val => \$sup->{password2}, hidden => 1 },
$o->{installClass} eq "server" || $::expert ? (
_("Use shadow file") => { val => \$o->{authentication}{shadow}, type => 'bool', text => _("shadow") },
_("Use MD5 passwords") => { val => \$o->{authentication}{md5}, type => 'bool', text => _("MD5") },
) : (), $::beginner ? () : (
_("Use NIS") => { val => \$nis, type => 'bool', text => _("yellow pages") },
)
],
complete => sub {
$sup->{password} eq $sup->{password2} or $o->ask_warn('', [ _("The passwords do not match"), _("Please try again") ]), return (1,1);
length $sup->{password} < 2 * $o->{security}
and $o->ask_warn('', _("This password is too simple (must be at least %d characters long)", 2 * $o->{security})), return (1,0);
return 0
}
) or return;
$o->{authentication}{NIS} &&= $nis;
$o->ask_from_entries_ref('',
_("Authentification NIS"),
[ _("NIS Domain"), _("NIS Server") ],
[ \ ($o->{netc}{NISDOMAIN} ||= $o->{netc}{DOMAINNAME}),
{ val => \$o->{authentication}{NIS}, list => ["broadcast"] },
]) if $nis;
install_steps::setRootPassword($o);
}
#------------------------------------------------------------------------------
#-addUser
#------------------------------------------------------------------------------
sub addUser {
my ($o, $clicked) = @_;
my $u = $o->{user} ||= {};
if ($o->{security} < 1) {
add2hash_($u, { name => "mandrake", password => "mandrake", realname => "default", icon => 'automagic' });
$o->{users} ||= [ $u ];
}
$u->{password2} ||= $u->{password} ||= "";
$u->{shell} ||= "/bin/bash";
my @fields = qw(realname name password password2);
my @shells = map { chomp; $_ } cat_("$o->{prefix}/etc/shells");
if (($o->{security} >= 1 || $clicked)) {
$u->{icon} = translate($u->{icon});
if ($o->ask_from_entries_refH(
[ _("Add user"), _("Accept user"), $o->{security} >= 4 && !@{$o->{users}} ? () : _("Done") ],
_("Enter a user\n%s", $o->{users} ? _("(already added %s)", join(", ", map { $_->{realname} || $_->{name} } @{$o->{users}})) : ''),
[
_("Real name") => \$u->{realname},
_("User name") => \$u->{name},
$o->{security} < 2 ? () : (
_("Password") => {val => \$u->{password}, hidden => 1},
_("Password (again)") => {val => \$u->{password2}, hidden => 1},
), $::beginner ? () : (
_("Shell") => {val => \$u->{shell}, list => [ any::shells($o->{prefix}) ], not_edit => !$::expert}
), $o->{security} > 3 ? () : (
_("Icon") => {val => \$u->{icon}, list => [ any::facesnames() ], icon2f => sub { any::face2xpm($_[0], $o->{prefix}) } },
),
],
focus_out => sub {
if ($_[0] eq 0) {
$u->{name} ||= lc first($u->{realname} =~ /((\w|-)+)/);
}
},
complete => sub {
$u->{password} eq $u->{password2} or $o->ask_warn('', [ _("The passwords do not match"), _("Please try again") ]), return (1,3);
$o->{security} > 3 && length($u->{password}) < 6 and $o->ask_warn('', _("This password is too simple")), return (1,2);
$u->{name} or $o->ask_warn('', _("Please give a user name")), return (1,0);
$u->{name} =~ /^[a-z0-9_-]+$/ or $o->ask_warn('', _("The user name must contain only lower cased letters, numbers, `-' and `_'")), return (1,0);
member($u->{name}, map { $_->{name} } @{$o->{users}}) and $o->ask_warn('', _("This user name is already added")), return (1,0);
return 0;
},
)) {
push @{$o->{users}}, $o->{user};
$o->{user} = {};
goto &addUser;
}
}
install_steps::addUser($o);
}