summaryrefslogtreecommitdiffstats
BranchCommit messageAuthorAge
masterUpdate Brazilian Portuguese translation from TxYuri Chornoivan2 months
distro/mga7Workaround a segfault on exitPascal Terjan5 years
user/animtim/designWorkupdate scanner iconTimothée Giet9 years
distro/mga2Updated German translationsOliver Burger13 years
distro/mga1Ukrainian translation updateYuri Chornoivan13 years
distro/mdv2010.0MDVA-2010:068 updated drakconf on 2010.0 to cooker's version,Eugeni Dodonov15 years
distro/mdv2008.010.11.5Thierry Vignaud16 years
distro/mdv2009.0merge in translations from trunkThierry Vignaud16 years
distro/mdv2009.1fix drakconsole not having the focus on startup (#48091)Thierry Vignaud16 years
distro/mdv2008.110.18.8Thierry Vignaud17 years
topic/MDK-2008_0-updatefix zh_CN translation QuitFunda Wang18 years
topic/MDK-2006_0-update10.3.1-1mdkThierry Vignaud20 years
topic/MDK-10_2-updatetypo fix (#15535)Thierry Vignaud20 years
topic/MDK-10-updatemerge with kde-3.3 branchThierry Vignaud20 years
 
TagDownloadAuthorAge
13.30control-center-13.30.tar  control-center-13.30.tar.gz  control-center-13.30.tar.bz2  control-center-13.30.tar.xz  control-center-13.30.zip  Martin Whitaker11 months
13.29control-center-13.29.tar  control-center-13.29.tar.gz  control-center-13.29.tar.bz2  control-center-13.29.tar.xz  control-center-13.29.zip  Papoteur2 years
13.28control-center-13.28.tar  control-center-13.28.tar.gz  control-center-13.28.tar.bz2  control-center-13.28.tar.xz  control-center-13.28.zip  Martin Whitaker2 years
13.27control-center-13.27.tar  control-center-13.27.tar.gz  control-center-13.27.tar.bz2  control-center-13.27.tar.xz  control-center-13.27.zip  Thomas Backlund4 years
13.21.1control-center-13.21.1.tar  control-center-13.21.1.tar.gz  control-center-13.21.1.tar.bz2  control-center-13.21.1.tar.xz  control-center-13.21.1.zip  Pascal Terjan5 years
13.26control-center-13.26.tar  control-center-13.26.tar.gz  control-center-13.26.tar.bz2  control-center-13.26.tar.xz  control-center-13.26.zip  Pascal Terjan5 years
13.25control-center-13.25.tar  control-center-13.25.tar.gz  control-center-13.25.tar.bz2  control-center-13.25.tar.xz  control-center-13.25.zip  Donald Stewart5 years
13.24control-center-13.24.tar  control-center-13.24.tar.gz  control-center-13.24.tar.bz2  control-center-13.24.tar.xz  control-center-13.24.zip  Nicolas Lécureuil5 years
13.23control-center-13.23.tar  control-center-13.23.tar.gz  control-center-13.23.tar.bz2  control-center-13.23.tar.xz  control-center-13.23.zip  Thomas Backlund6 years
13.22control-center-13.22.tar  control-center-13.22.tar.gz  control-center-13.22.tar.bz2  control-center-13.22.tar.xz  control-center-13.22.zip  Papoteur6 years
13.21control-center-13.21.tar  control-center-13.21.tar.gz  control-center-13.21.tar.bz2  control-center-13.21.tar.xz  control-center-13.21.zip  Donald Stewart6 years
13.20control-center-13.20.tar  control-center-13.20.tar.gz  control-center-13.20.tar.bz2  control-center-13.20.tar.xz  control-center-13.20.zip  José JORGE [zezinho]6 years
13.17control-center-13.17.tar  control-center-13.17.tar.gz  control-center-13.17.tar.bz2  control-center-13.17.tar.xz  control-center-13.17.zip  Thierry Vignaud7 years
13.16control-center-13.16.tar  control-center-13.16.tar.gz  control-center-13.16.tar.bz2  control-center-13.16.tar.xz  control-center-13.16.zip  Rémi Verschelde8 years
13.15control-center-13.15.tar  control-center-13.15.tar.gz  control-center-13.15.tar.bz2  control-center-13.15.tar.xz  control-center-13.15.zip  Thierry Vignaud8 years
13.14control-center-13.14.tar  control-center-13.14.tar.gz  control-center-13.14.tar.bz2  control-center-13.14.tar.xz  control-center-13.14.zip  Thierry Vignaud8 years
13.13control-center-13.13.tar  control-center-13.13.tar.gz  control-center-13.13.tar.bz2  control-center-13.13.tar.xz  control-center-13.13.zip  Rémi Verschelde8 years
13.11control-center-13.11.tar  control-center-13.11.tar.gz  control-center-13.11.tar.bz2  control-center-13.11.tar.xz  control-center-13.11.zip  Thierry Vignaud9 years
13.10control-center-13.10.tar  control-center-13.10.tar.gz  control-center-13.10.tar.bz2  control-center-13.10.tar.xz  control-center-13.10.zip  Thierry Vignaud9 years
13.9control-center-13.9.tar  control-center-13.9.tar.gz  control-center-13.9.tar.bz2  control-center-13.9.tar.xz  control-center-13.9.zip  Thierry Vignaud9 years
13.8control-center-13.8.tar  control-center-13.8.tar.gz  control-center-13.8.tar.bz2  control-center-13.8.tar.xz  control-center-13.8.zip  Thierry Vignaud9 years
13.7control-center-13.7.tar  control-center-13.7.tar.gz  control-center-13.7.tar.bz2  control-center-13.7.tar.xz  control-center-13.7.zip  Rémi Verschelde9 years
13.6control-center-13.6.tar  control-center-13.6.tar.gz  control-center-13.6.tar.bz2  control-center-13.6.tar.xz  control-center-13.6.zip  Thierry Vignaud9 years
13.5control-center-13.5.tar  control-center-13.5.tar.gz  control-center-13.5.tar.bz2  control-center-13.5.tar.xz  control-center-13.5.zip  Rémi Verschelde9 years
13.4control-center-13.4.tar  control-center-13.4.tar.gz  control-center-13.4.tar.bz2  control-center-13.4.tar.xz  control-center-13.4.zip  Anne Nicolas9 years
13.3control-center-13.3.tar  control-center-13.3.tar.gz  control-center-13.3.tar.bz2  control-center-13.3.tar.xz  control-center-13.3.zip  Thierry Vignaud9 years
13.2control-center-13.2.tar  control-center-13.2.tar.gz  control-center-13.2.tar.bz2  control-center-13.2.tar.xz  control-center-13.2.zip  Thierry Vignaud9 years
13.1control-center-13.1.tar  control-center-13.1.tar.gz  control-center-13.1.tar.bz2  control-center-13.1.tar.xz  control-center-13.1.zip  Thierry Vignaud10 years
13.0control-center-13.0.tar  control-center-13.0.tar.gz  control-center-13.0.tar.bz2  control-center-13.0.tar.xz  control-center-13.0.zip  Thierry Vignaud10 years
12.60control-center-12.60.tar  control-center-12.60.tar.gz  control-center-12.60.tar.bz2  control-center-12.60.tar.xz  control-center-12.60.zip  Thierry Vignaud10 years
12.59control-center-12.59.tar  control-center-12.59.tar.gz  control-center-12.59.tar.bz2  control-center-12.59.tar.xz  control-center-12.59.zip  Thierry Vignaud10 years
12.58control-center-12.58.tar  control-center-12.58.tar.gz  control-center-12.58.tar.bz2  control-center-12.58.tar.xz  control-center-12.58.zip  Rémi Verschelde10 years
12.57control-center-12.57.tar  control-center-12.57.tar.gz  control-center-12.57.tar.bz2  control-center-12.57.tar.xz  control-center-12.57.zip  Thierry Vignaud10 years
12.56control-center-12.56.tar  control-center-12.56.tar.gz  control-center-12.56.tar.bz2  control-center-12.56.tar.xz  control-center-12.56.zip  Luc Menut10 years
12.55control-center-12.55.tar  control-center-12.55.tar.gz  control-center-12.55.tar.bz2  control-center-12.55.tar.xz  control-center-12.55.zip  Luc Menut10 years
12.54control-center-12.54.tar  control-center-12.54.tar.gz  control-center-12.54.tar.bz2  control-center-12.54.tar.xz  control-center-12.54.zip  Anne Nicolas11 years
12.53control-center-12.53.tar  control-center-12.53.tar.gz  control-center-12.53.tar.bz2  control-center-12.53.tar.xz  control-center-12.53.zip  Rémi Verschelde11 years
12.52control-center-12.52.tar  control-center-12.52.tar.gz  control-center-12.52.tar.bz2  control-center-12.52.tar.xz  control-center-12.52.zip  Thierry Vignaud11 years
12.41control-center-12.41.tar  control-center-12.41.tar.gz  control-center-12.41.tar.bz2  control-center-12.41.tar.xz  control-center-12.41.zip  ennael12 years
12.40control-center-12.40.tar  control-center-12.40.tar.gz  control-center-12.40.tar.bz2  control-center-12.40.tar.xz  control-center-12.40.zip  Colin Guthrie12 years
12.39control-center-12.39.tar  control-center-12.39.tar.gz  control-center-12.39.tar.bz2  control-center-12.39.tar.xz  control-center-12.39.zip  Thierry Vignaud12 years
12.38control-center-12.38.tar  control-center-12.38.tar.gz  control-center-12.38.tar.bz2  control-center-12.38.tar.xz  control-center-12.38.zip  Thierry Vignaud12 years
12.37control-center-12.37.tar  control-center-12.37.tar.gz  control-center-12.37.tar.bz2  control-center-12.37.tar.xz  control-center-12.37.zip  Donald12 years
12.33control-center-12.33.tar  control-center-12.33.tar.gz  control-center-12.33.tar.bz2  control-center-12.33.tar.xz  control-center-12.33.zip  Thierry Vignaud13 years
12.32control-center-12.32.tar  control-center-12.32.tar.gz  control-center-12.32.tar.bz2  control-center-12.32.tar.xz  control-center-12.32.zip  Thierry Vignaud13 years
12.31control-center-12.31.tar  control-center-12.31.tar.gz  control-center-12.31.tar.bz2  control-center-12.31.tar.xz  control-center-12.31.zip  Thierry Vignaud13 years
12.29.1control-center-12.29.1.tar  control-center-12.29.1.tar.gz  control-center-12.29.1.tar.bz2  control-center-12.29.1.tar.xz  control-center-12.29.1.zip  Thierry Vignaud13 years
12.29control-center-12.29.tar  control-center-12.29.tar.gz  control-center-12.29.tar.bz2  control-center-12.29.tar.xz  control-center-12.29.zip  Anne Nicolas13 years
12.27control-center-12.27.tar  control-center-12.27.tar.gz  control-center-12.27.tar.bz2  control-center-12.27.tar.xz  control-center-12.27.zip  Anne Nicolas13 years
12.25control-center-12.25.tar  control-center-12.25.tar.gz  control-center-12.25.tar.bz2  control-center-12.25.tar.xz  control-center-12.25.zip  Anne Nicolas13 years
12.24control-center-12.24.tar  control-center-12.24.tar.gz  control-center-12.24.tar.bz2  control-center-12.24.tar.xz  control-center-12.24.zip  Anne Nicolas13 years
12.23control-center-12.23.tar  control-center-12.23.tar.gz  control-center-12.23.tar.bz2  control-center-12.23.tar.xz  control-center-12.23.zip  Thierry Vignaud13 years
12.22.1control-center-12.22.1.tar  control-center-12.22.1.tar.gz  control-center-12.22.1.tar.bz2  control-center-12.22.1.tar.xz  control-center-12.22.1.zip  Thierry Vignaud14 years
12.22control-center-12.22.tar  control-center-12.22.tar.gz  control-center-12.22.tar.bz2  control-center-12.22.tar.xz  control-center-12.22.zip  Thierry Vignaud14 years
12.21.9control-center-12.21.9.tar  control-center-12.21.9.tar.gz  control-center-12.21.9.tar.bz2  control-center-12.21.9.tar.xz  control-center-12.21.9.zip  Anne Nicolas14 years
12.21.6control-center-12.21.6.tar  control-center-12.21.6.tar.gz  control-center-12.21.6.tar.bz2  control-center-12.21.6.tar.xz  control-center-12.21.6.zip  Thierry Vignaud14 years
MDK-10_2control-center-MDK-10_2.tar  control-center-MDK-10_2.tar.gz  control-center-MDK-10_2.tar.bz2  control-center-MDK-10_2.tar.xz  control-center-MDK-10_2.zip  Mystery Man20 years
MDK-9_2control-center-MDK-9_2.tar  control-center-MDK-9_2.tar.gz  control-center-MDK-9_2.tar.bz2  control-center-MDK-9_2.tar.xz  control-center-MDK-9_2.zip  Mystery Man22 years
R9_0control-center-R9_0.tar  control-center-R9_0.tar.gz  control-center-R9_0.tar.bz2  control-center-R9_0.tar.xz  control-center-R9_0.zip  Mystery Man23 years
control-centercontrol-center.tar  control-center.tar.gz  control-center.tar.bz2  control-center.tar.xz  control-center.zip  Mystery Man23 years
ver_8_1control-center-ver_8_1.tar  control-center-ver_8_1.tar.gz  control-center-ver_8_1.tar.bz2  control-center-ver_8_1.tar.xz  control-center-ver_8_1.zip  Mystery Man24 years
ard_unsafe} = 1; $o->{keyboard} = keyboard::from_usb() || keyboard::lang2keyboard($o->{lang}); keyboard::setup($o->{keyboard}) if !$::live; } addToBeDone { lang::write_langs($o->{prefix}, $o->{langs}); } 'formatPartitions' unless $::g_auto_install; addToBeDone { lang::write($o->{prefix}, $o->{lang}); } 'installPackages' unless $::g_auto_install; } #------------------------------------------------------------------------------ sub selectKeyboard { my ($o) = @_; keyboard::setup($o->{keyboard}); addToBeDone { keyboard::write($o->{prefix}, $o->{keyboard}, lang::lang2charset($o->{lang})); } 'installPackages' unless $::g_auto_install; } #------------------------------------------------------------------------------ sub acceptLicence {} sub selectPath {} #------------------------------------------------------------------------------ sub selectInstallClass {} #------------------------------------------------------------------------------ sub setupSCSI { my ($o) = @_; modules::configure_pcmcia($o->{pcmcia}) if $o->{pcmcia}; modules::load_ide(); modules::load_category('disk/scsi|hardware_raid'); } #------------------------------------------------------------------------------ sub doPartitionDisksBefore { my ($o) = @_; eval { close *pkgs::LOG; eval { fs::umount("$o->{prefix}/proc") }; eval { fs::umount_all($o->{fstab}, $o->{prefix}) }; eval { sleep 1; fs::umount_all($o->{fstab}, $o->{prefix}) } if $@; #- HACK } if $o->{fstab} && !$::testing && !$::live; } #------------------------------------------------------------------------------ sub doPartitionDisksAfter { my ($o) = @_; if (!$::testing) { my $hds = $o->{all_hds}{hds}; partition_table::write($_) foreach @$hds; $_->{rebootNeeded} and $o->rebootNeeded foreach @$hds; } fs::set_removable_mntpoints($o->{all_hds}); fs::set_all_default_options($o->{all_hds}, $o->{useSupermount}, $o->{security}, lang::fs_options($o->{lang})) if !$o->{isUpgrade}; $o->{fstab} = [ fsedit::get_all_fstab($o->{all_hds}) ]; fsedit::get_root_($o->{fstab}) or die "Oops, no root partition"; if (arch() =~ /ppc/ && detect_devices::get_mac_generation =~ /NewWorld/) { die "Need bootstrap partition to boot system!" if !(defined $partition_table::mac::bootstrap_part); } if (arch() =~ /ia64/ && !fsedit::has_mntpoint("/boot/efi", $o->{all_hds})) { die _("You must have a FAT partition mounted in /boot/efi"); } if ($o->{partitioning}{use_existing_root}) { #- ensure those partitions are mounted so that they are not proposed in choosePartitionsToFormat fs::mount_part($_, $o->{prefix}) foreach (sort { $a->{mntpoint} cmp $b->{mntpoint} } grep { $_->{mntpoint} && maybeFormatted($_) } @{$o->{fstab}}); } cat_("/proc/mounts") =~ m|(\S+)\s+/tmp/image nfs| && !grep { $_->{mntpoint} eq "/mnt/nfs" } @{$o->{all_hds}{nfss}} and push @{$o->{all_hds}{nfss}}, { type => 'nfs', mntpoint => "/mnt/nfs", device => $1, options => "noauto,ro,nosuid,soft,rsize=8192,wsize=8192" }; } #------------------------------------------------------------------------------ sub doPartitionDisks { my ($o) = @_; install_any::getHds($o); if ($o->{partitioning}{use_existing_root} || $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}) || first(install_any::find_root_parts($o->{fstab}, $o->{prefix})) or die; install_any::use_root_part($o->{all_hds}, $p, $o->{prefix}); } if ($o->{partitioning}{auto_allocate}) { fsedit::auto_allocate($o->{all_hds}, $o->{partitions}); } } #------------------------------------------------------------------------------ sub ask_mntpoint_s { my ($o, $fstab) = @_; #- TODO: set the mntpoints my %m; foreach (@$fstab) { my $m = $_->{mntpoint}; next unless $m && $m ne 'swap'; #- there may be a lot of swap. $m{$m} and die _("Duplicate mount point %s", $m); $m{$m} = 1; #- in case the type does not correspond, force it to ext2 $_->{type} = 0x83 if $m =~ m|^/| && !isFat($_) && !isTrueFS($_); } 1; } sub rebootNeeded($) { my ($o) = @_; log::l("Rebooting..."); c::_exit(0); } sub choosePartitionsToFormat($$) { my ($o, $fstab) = @_; foreach (@$fstab) { $_->{mntpoint} = "swap" if isSwap($_); $_->{mntpoint} or next; add2hash_($_, { toFormat => $_->{notFormatted} }); $_->{toFormatUnsure} = member($_->{mntpoint}, '/', '/usr'); if (!$_->{toFormat}) { my $t = fsedit::typeOfPart($_->{device}); $_->{toFormatUnsure} ||= #- if detected dos/win, it's not precise enough to just compare the types (too many of them) (!$t || isOtherAvailableFS({ type => $t }) ? !isOtherAvailableFS($_) : $t != $_->{type}); } } } sub formatMountPartitions { my ($o) = @_; fs::formatMount_all($o->{all_hds}{raids}, $o->{fstab}, $o->{prefix}); } #------------------------------------------------------------------------------ sub setPackages { my ($o, $rebuild_needed) = @_; install_any::setPackages($o, $rebuild_needed); if ($rebuild_needed) { pkgs::selectPackagesToUpgrade($o->{packages}, $o->{prefix}, $o->{base}, $o->{toRemove}, $o->{toSave}); } else { pkgs::selectPackagesAlreadyInstalled($o->{packages}, $o->{prefix}); } } sub choosePackages { my ($o, $packages, $compssUsers, $first_time) = @_; #- now for upgrade, package that must be upgraded are #- selected first, after is used the same scheme as install. #- make sure we kept some space left for available else the system may #- not be able to start (xfs at least). my $available = install_any::getAvailableSpace($o); my $availableCorrected = pkgs::invCorrectSize($available / sqr(1024)) * sqr(1024); log::l(sprintf "available size %s (corrected %s)", formatXiB($available), formatXiB($availableCorrected)); add2hash_($o, { compssListLevel => 5 }) if !$::auto_install; #- avoid destroying user selection of packages but only #- for expert, as they may have done individual selection before. if ($first_time || !$::expert) { exists $o->{compssListLevel} and pkgs::setSelectedFromCompssList($packages, $o->{compssUsersChoice}, $o->{compssListLevel}, $availableCorrected); } $availableCorrected; } sub beforeInstallPackages { my ($o) = @_; #- save these files in case of upgrade failure. if ($o->{isUpgrade}) { foreach (@filesToSaveForUpgrade) { unlink "$o->{prefix}/$_.mdkgisave"; if (-e "$o->{prefix}/$_") { eval { cp_af("$o->{prefix}/$_", "$o->{prefix}/$_.mdkgisave") }; } } foreach (@filesNewerToUseAfterUpgrade) { unlink "$o->{prefix}/$_.rpmnew"; } } #- some packages need such files for proper installation. install_any::write_fstab($o); require network; network::add2hosts("$o->{prefix}/etc/hosts", "localhost.localdomain", "127.0.0.1"); log::l("setting excludedocs to $o->{excludedocs}"); substInFile { s/%_excludedocs.*//; $_ .= "%_excludedocs yes\n" if eof && $o->{excludedocs} } "$o->{prefix}/etc/rpm/macros"; } sub pkg_install { my ($o, @l) = @_; log::l("selecting packages"); require pkgs; if ($::testing) { log::l("selecting package \"$_\"") foreach @l; } else { $o->{packages}{rpmdb} ||= pkgs::rpmDbOpen($o->{prefix}); pkgs::selectPackage($o->{packages}, pkgs::packageByName($o->{packages}, $_) || die "$_ rpm not found") foreach @l; } my @toInstall = pkgs::packagesToInstall($o->{packages}); if (@toInstall) { log::l("installing packages"); $o->installPackages; } else { log::l("all packages selected are already installed, nothing to do") } } sub pkg_install_if_requires_satisfied { my ($o, @l) = @_; require pkgs; $o->{packages}{rpmdb} ||= pkgs::rpmDbOpen($o->{prefix}); foreach (@l) { my %newSelection; my $pkg = pkgs::packageByName($o->{packages}, $_) || die "$_ rpm not found"; pkgs::selectPackage($o->{packages}, $pkg, 0, \%newSelection); if (scalar(keys %newSelection) == 1) { pkgs::selectPackage($o->{packages}, $pkg); } else { log::l("pkg_install_if_requires_satisfied: not selecting $_ because of ", join(", ", keys %newSelection)); } } $o->installPackages; } sub installPackages($$) { #- complete REWORK, TODO and TOCHECK! my ($o) = @_; my $packages = $o->{packages}; #- this method is always called, go here to close still opened rpm db. delete $packages->{rpmdb}; if (@{$o->{toRemove} || []}) { #- hack to ensure proper upgrade of packages from other distribution, #- as release number are not mandrake based. this causes save of #- important files and restore them after. foreach (@{$o->{toSave} || []}) { if (-e "$o->{prefix}/$_") { eval { cp_af("$o->{prefix}/$_", "$o->{prefix}/$_.mdkgisave") }; } } pkgs::remove($o->{prefix}, $o->{toRemove}); foreach (@{$o->{toSave} || []}) { if (-e "$o->{prefix}/$_.mdkgisave") { renamef("$o->{prefix}/$_.mdkgisave", "$o->{prefix}/$_"); } } $o->{toSave} = []; #- hack for compat-glibc to upgrade properly :-( if (pkgs::packageByName($packages, 'compat-glibc')->flag_selected && !pkgs::packageByName($packages, 'compat-glibc')->flag_installed) { rename "$o->{prefix}/usr/i386-glibc20-linux", "$o->{prefix}/usr/i386-glibc20-linux.mdkgisave"; } } #- small transaction will be built based on this selection and depslist. my @toInstall = pkgs::packagesToInstall($packages); my $time = time; $ENV{DURING_INSTALL} = 1; pkgs::install($o->{prefix}, $o->{isUpgrade}, \@toInstall, $packages); delete $ENV{DURING_INSTALL}; run_program::rooted_or_die($o->{prefix}, 'ldconfig') unless $::g_auto_install; log::l("Install took: ", formatTimeRaw(time - $time)); install_any::log_sizes($o); scalar(@toInstall); #- return number of packages installed. } sub afterInstallPackages($) { my ($o) = @_; return if $::g_auto_install; die _("Some important packages didn't get installed properly. Either your cdrom drive or your cdrom is defective. Check the cdrom on an installed computer using \"rpm -qpl Mandrake/RPMS/*.rpm\" ") if grep { m|read failed: Input/output error| } cat_("$o->{prefix}/root/drakx/install.log"); if (arch() !~ /^sparc/) { #- TODO restore it as may be needed for sparc -x "$o->{prefix}/usr/bin/dumpkeys" or $::testing or die "Some important packages didn't get installed properly. Please switch to console 2 (using ctrl-alt-f2) and look at the log file /tmp/ddebug.log Consoles 1,3,4,7 may also contain interesting information"; } #- why not? cuz weather is nice today :-) [pixel] common::sync(); common::sync(); my $have_devfsd = do { my $p = pkgs::packageByName($o->{packages}, 'devfsd'); $p && $p->flag_installed }; if ($have_devfsd) { require bootloader; bootloader::may_append($o->{bootloader}, devfs => 'mount'); } #- generate /etc/lvmtab needed for rc.sysinit run_program::rooted($o->{prefix}, 'vgscan') if -e '/etc/lvmtab'; #- configure PCMCIA services if needed. modules::write_pcmcia($o->{prefix}, $o->{pcmcia}); #- for mandrake_firstime touch "$o->{prefix}/var/lock/TMP_1ST"; any::config_dvd($o->{prefix}, $have_devfsd); any::config_mtools($o->{prefix}); any::writeandclean_ldsoconf($o->{prefix}); #- make sure wins is disabled in /etc/nsswitch.conf #- else if eth0 is not existing, glibc segfaults. substInFile { s/\s*wins// if /^\s*hosts\s*:/ } "$o->{prefix}/etc/nsswitch.conf"; #- make sure some services have been enabled (or a catastrophic restart will occur). #- these are normally base package post install scripts or important services to start. run_program::rooted($o->{prefix}, "chkconfig", "--add", $_) foreach qw(random netfs network rawdevices sound kheader usb keytable syslog crond portmap); if ($o->{mouse}{device} =~ /ttyS/) { log::l("disabling gpm for serial mice (doesn't get along nicely with X)"); run_program::rooted($o->{prefix}, "chkconfig", "--del", "gpm") } #- call update-menus at the end of package installation run_program::rooted($o->{prefix}, "update-menus"); if ($o->{pcmcia}) { substInFile { s/.*(TaskBarShowAPMStatus).*/$1=1/ } "$o->{prefix}/usr/lib/X11/icewm/preferences"; eval { cp_af("$o->{prefix}/usr/share/applnk/System/kapm.kdelnk", "$o->{prefix}/etc/skel/Desktop/Autostart/kapm.kdelnk") }; } $o->install_urpmi; if ($o->{lang} =~ /^(zh_TW|th|vi|be|bg)/) { #- skip since we don't have the right font (it badly fails at least for zh_TW) } elsif (my $LANG = lang::lang2LANG($o->{lang})) { my $kdmrc = "$o->{prefix}/usr/share/config/kdm/kdmrc"; my $kde_charset = lang::charset2kde_charset(lang::lang2charset($o->{lang})); my $welcome = c::to_utf8(_("Welcome to %s", '%n')); substInFile { s/^(GreetString)=.*/$1=$welcome/; s/^(Language)=.*/$1=$LANG/; if (!member($kde_charset, 'iso8859-1', 'iso8859-15')) { #- don't keep the default for those s/^(StdFont)=.*/$1=*,12,5,$kde_charset,50,0/; s/^(FailFont)=.*/$1=*,12,5,$kde_charset,75,0/; s/^(GreetFont)=.*/$1=*,24,5,$kde_charset,50,0/; } } "$o->{prefix}/usr/share/config/kdm/kdmrc"; } install_any::disable_user_view($o->{prefix}) if $o->{security} >= 3 || $o->{authentication}{NIS}; run_program::rooted($o->{prefix}, "kdeDesktopCleanup"); foreach (list_skels($o->{prefix}, '.kde/share/config/kfmrc')) { my $found; substInFile { $found ||= /KFM Misc Defaults/; $_ .= "[KFM Misc Defaults] GridWidth=85 GridHeight=70 " if eof && !$found; } $_ } #- move some file after an upgrade that may be seriously annoying. #- and rename saved files to .mdkgiorig. if ($o->{isUpgrade}) { my $pkg = pkgs::packageByName($o->{packages}, 'rpm'); $pkg && ($pkg->flag_selected || $pkg->flag_installed) && $pkg->compare(">= 4.0") and pkgs::cleanOldRpmDb($o->{prefix}); log::l("moving previous desktop files that have been updated to Trash of each user"); install_any::kdemove_desktop_file($o->{prefix}); foreach (@filesToSaveForUpgrade) { renamef("$o->{prefix}/$_.mdkgisave", "$o->{prefix}/$_.mdkgiorig") if -e "$o->{prefix}$_.mdkgisave"; } foreach (@filesNewerToUseAfterUpgrade) { if (-e "$o->{prefix}/$_.rpmnew" && -e "$o->{prefix}/$_") { renamef("$o->{prefix}/$_", "$o->{prefix}/$_.mdkgiorig"); renamef("$o->{prefix}/$_.rpmnew", "$o->{prefix}/$_"); } } } if ($o->{blank} || $o->{updatemodules}) { my @l = detect_devices::floppies_dev(); foreach (qw(blank updatemodules)) { $o->{$_} eq "1" and $o->{$_} = $l[0] || die _("No floppy drive available"); } $o->{blank} and $o->copyKernelFromFloppy(); $o->{updatemodules} and $o->updateModulesFromFloppy(); } } sub copyKernelFromFloppy { my ($o) = @_; return if $::testing || !$o->{blank}; fs::mount($o->{blank}, "/floppy", "vfat", 0); eval { cp_af("/floppy/vmlinuz", "$o->{prefix}/boot/vmlinuz-default") }; if ($@) { log::l("copying of /floppy/vmlinuz from blank modified disk failed: $@"); } fs::umount("/floppy"); } sub install_urpmi { my ($o) = @_; my $pkg = pkgs::packageByName($o->{packages}, 'urpmi'); if ($pkg && ($pkg->flag_selected || $pkg->flag_installed)) { install_any::install_urpmi($o->{prefix}, $::oem ? 'cdrom' : $o->{method}, #- HACK $o->{packages}{mediums}); pkgs::saveCompssUsers($o->{prefix}, $o->{packages}, $o->{compssUsers}, $o->{compssUsersSorted}); } } sub updateModulesFromFloppy { my ($o) = @_; return if $::testing || !$o->{updatemodules}; fs::mount($o->{updatemodules}, "/floppy", "ext2", 0); foreach (glob_("$o->{prefix}/lib/modules/*")) { my ($kernelVersion) = m,lib/modules/(\S*),; log::l("examining updated modules for kernel $kernelVersion"); if (-d "/floppy/$kernelVersion") { my @src_files = glob_("/floppy/$kernelVersion/*"); my @dest_files = map { chomp_($_) } run_program::rooted_get_stdout($o->{prefix}, 'find', '/lib/modules'); foreach my $s (@src_files) { log::l("found updatable module $s"); my ($sfile, $sext) = $s =~ /([^\/\.]*\.o)(?:\.gz|\.bz2)?$/; my $qsfile = quotemeta $sfile; my $qsext = quotemeta $sext; foreach my $target (@dest_files) { $target =~ /$qsfile/ or next; eval { cp_af($s, $target) }; if ($@) { log::l("updating module $target by $s failed: $@"); } else { log::l("updating module $target by $s"); } if ($target !~ /$qsfile$qsext$/) { #- extension differ, first rename target file correctly, #- then uncompress source file, then compress it as expected. my ($basetarget, $text) = $target =~ /(.*?)(\.gz|\.bz2)$/; rename $target, "$basetarget$sext"; $sext eq '.gz' and run_program::run("gzip", "-d", "$basetarget$sext"); $sext eq '.bz2' and run_program::run("bzip2", "-d", "$basetarget$sext"); $text eq '.gz' and run_program::run("gzip", $basetarget); $text eq '.bz2' and run_program::run("bzip2", $basetarget); } } } } } fs::umount("/floppy"); } #------------------------------------------------------------------------------ sub selectMouse($) { my ($o) = @_; } #------------------------------------------------------------------------------ sub configureNetwork { my ($o) = @_; require network; network::configureNetwork2($o, $o->{prefix}, $o->{netc}, $o->{intf}); if ($o->{method} =~ /ftp|http|nfs/) { $o->{netcnx}{type} = 'lan'; foreach ("up", "down") { my $f = "$o->{prefix}/etc/sysconfig/network-scripts/net_cnx_$_"; output $f, "\nif$_ eth0\n"; chmod 0755, $f; } output "$o->{prefix}/etc/sysconfig/network-scripts/net_cnx_pg", "\n/usr/sbin/drakconnet\n"; } } #------------------------------------------------------------------------------ sub installCrypto { my ($o) = @_; my $u = $o->{crypto} or return; $u->{mirror} && $u->{packages} or return; upNetwork($o); require crypto; my @crypto_packages = crypto::getPackages($o->{prefix}, $o->{packages}, $u->{mirror}); $o->pkg_install(@{$u->{packages}}); } sub installUpdates { my ($o) = @_; my $u = $o->{updates} or return; $u->{updates} or return; upNetwork($o); require crypto; crypto::getPackages($o->{prefix}, $o->{packages}, $u->{mirror}) and $o->pkg_install(@{$u->{packages} || []}); #- re-install urpmi with update security medium. $o->install_urpmi; } sub summary { my ($o) = @_; configureTimezone($o); configurePrinter($o) if $o->{printer}; } #------------------------------------------------------------------------------ sub configureTimezone { my ($o) = @_; install_any::preConfigureTimezone($o); $o->pkg_install('ntp') if $o->{timezone}{ntp}; require timezone; timezone::write($o->{prefix}, $o->{timezone}); } #------------------------------------------------------------------------------ sub configureServices { my ($o) = @_; if ($o->{services}) { require services; services::doit($o, $o->{services}, $o->{prefix}); } } #------------------------------------------------------------------------------ sub configurePrinter { my($o) = @_; $o->do_pkgs->install('foomatic', 'printer-utils','printer-testpages', if_($o->do_pkgs->is_installed('gimp'), 'gimpprint')); require printer;