summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm270
1 files changed, 153 insertions, 117 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 01fd2f333..57443eed7 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -9,8 +9,9 @@ use vars qw(@filesToSaveForUpgrade @filesNewerToUseAfterUpgrade);
#-######################################################################################
use common;
use install_any qw(:all);
-use partition_table qw(:types);
+use partition_table;
use detect_devices;
+use fs::type;
use modules;
use run_program;
use lang;
@@ -21,7 +22,6 @@ use do_pkgs;
use pkgs;
use any;
use log;
-use fs;
our @ISA = qw(do_pkgs);
@@ -86,8 +86,9 @@ Continue at your own risk."), formatError($@) ]) if $@;
}
sub errorInStep {
- my ($_o, $_err) = @_;
+ my ($_o, $err) = @_;
print "error :(\n";
+ print "$err\n\n";
c::_exit(1);
}
sub kill_action {}
@@ -106,6 +107,7 @@ sub selectLanguage {
if (!exists $o->{locale}{country}) {
my $h = lang::analyse_locale_name(lang::l2locale($o->{locale}{lang}));
$o->{locale}{country} = $h->{country} if $h->{country};
+ $o->{locale}{IM} = lang::get_default_im($o->{locale}{lang});
}
lang::set($o->{locale}, !$o->isa('interactive::gtk'));
@@ -128,7 +130,7 @@ sub selectLanguage {
lang::write_langs($o->{locale}{langs});
} 'formatPartitions';
addToBeDone {
- lang::write($o->{prefix}, $o->{locale});
+ lang::write($o->{locale});
} 'installPackages';
}
#------------------------------------------------------------------------------
@@ -153,10 +155,10 @@ sub acceptLicense {}
#------------------------------------------------------------------------------
sub setupSCSI {
my ($o) = @_;
- install_any::configure_pcmcia($o->{pcmcia}) if $o->{pcmcia};
+ install_any::configure_pcmcia($o->{modules_conf}, $o->{pcmcia}) if $o->{pcmcia};
modules::load(modules::category2modules('disk/cdrom'));
- modules::load_category('bus/firewire');
- modules::load_category('disk/scsi|hardware_raid|firewire');
+ modules::load_category($o->{modules_conf}, 'bus/firewire');
+ modules::load_category($o->{modules_conf}, 'disk/ide|scsi|hardware_raid|firewire');
install_any::getHds($o);
}
@@ -167,8 +169,8 @@ sub selectInstallClass {
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})) || die)->{part};
- install_any::use_root_part($o->{all_hds}, $p, $o->{prefix});
+ my $p = fs::get::root_($o->{fstab}) || (first(install_any::find_root_parts($o->{fstab}, $o->{prefix})) || die)->{part};
+ $o->{migrate_device_names} = install_any::use_root_part($o->{all_hds}, $p);
}
}
@@ -176,6 +178,8 @@ sub selectInstallClass {
sub doPartitionDisksBefore {
my ($o) = @_;
eval {
+ eval { fs::umount("$o->{prefix}/sys") };
+ eval { fs::umount("$o->{prefix}/proc/bus/usb") };
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
@@ -193,17 +197,17 @@ sub doPartitionDisksAfter {
}
fs::set_removable_mntpoints($o->{all_hds});
- fs::set_all_default_options($o->{all_hds}, %$o, lang::fs_options($o->{locale}))
+ fs::mount_options::set_all_default($o->{all_hds}, %$o, lang::fs_options($o->{locale}))
if !$o->{isUpgrade};
- $o->{fstab} = [ fsedit::get_all_fstab($o->{all_hds}) ];
- fsedit::get_root_($o->{fstab}) or die "Oops, no root partition";
+ $o->{fstab} = [ fs::get::fstab($o->{all_hds}) ];
+ fs::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})) {
+ if (arch() =~ /ia64/ && !fs::get::has_mntpoint("/boot/efi", $o->{all_hds})) {
die N("You must have a FAT partition mounted in /boot/efi");
}
@@ -215,7 +219,7 @@ sub doPartitionDisksAfter {
cat_("/proc/mounts") =~ m|(\S+)\s+/tmp/nfsimage| &&
!any { $_->{mntpoint} eq "/mnt/nfs" } @{$o->{all_hds}{nfss}} and
- push @{$o->{all_hds}{nfss}}, { pt_type => 'nfs', mntpoint => "/mnt/nfs", device => $1, options => "noauto,ro,nosuid,soft,rsize=8192,wsize=8192" };
+ push @{$o->{all_hds}{nfss}}, { fs_type => 'nfs', mntpoint => "/mnt/nfs", device => $1, options => "noauto,ro,nosuid,soft,rsize=8192,wsize=8192" };
}
#------------------------------------------------------------------------------
@@ -243,7 +247,7 @@ sub ask_mntpoint_s {#-}}}
$m{$m} = 1;
#- in case the type does not correspond, force it to ext3
- $_->{pt_type} = 0x483 if $m =~ m|^/| && !isTrueFS($_) && !isOtherAvailableFS($_);
+ fs::type::set_fs_type($_, 'ext3') if $m =~ m|^/| && !isTrueFS($_) && !isOtherAvailableFS($_);
}
1;
}
@@ -262,14 +266,15 @@ sub choosePartitionsToFormat($$) {
$_->{mntpoint} = "swap" if isSwap($_);
$_->{mntpoint} or next;
- add2hash_($_, { toFormat => $_->{notFormatted} });
+ add2hash_($_, { toFormat => $_->{notFormatted} }) if $_->{fs_type}; #- eg: don't set toFormat for isRawRAID (0xfd)
$_->{$::recovery ? 'toFormat' : '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({ pt_type => $t }) ? !isOtherAvailableFS($_) : $t != $_->{pt_type});
+ my $fs_type = fs::type::fs_type_from_magic($_);
+ if (!$fs_type || $fs_type ne $_->{fs_type}) {
+ log::l("setting toFormatUnsure for $_->{device} because <$_->{fs_type}> ne <$fs_type>");
+ $_->{toFormatUnsure} = 1;
+ }
}
}
}
@@ -288,6 +293,14 @@ sub setPackages {
$rebuild_needed and pkgs::selectPackagesToUpgrade($o->{packages}, $o->{prefix});
}
+sub deselectFoundMedia {
+ my (undef, $hdlists) = @_;
+ @$hdlists;
+}
+
+sub selectSupplMedia { '' }
+sub askSupplMirror { '' }
+
sub choosePackages {
my ($o, $packages, $_compssUsers, $first_time) = @_;
@@ -306,11 +319,48 @@ sub choosePackages {
#- 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);
+ and pkgs::setSelectedFromCompssList($packages, $o->{rpmsrate_flags_chosen}, $o->{compssListLevel}, $availableCorrected);
}
$availableCorrected;
}
+sub upgrading_redhat() {
+ #- remove weird config files that bother Xconfig::* too much
+ unlink "$::prefix/etc/X11/XF86Config";
+ unlink "$::prefix/etc/X11/XF86Config-4";
+
+ sub prefering_mdk {
+ my ($lpkg, $rpkg_ver, $c) = @_;
+ my $lpkg_ver = $lpkg->version . '-' . $lpkg->release;
+ log::l($lpkg->name . ' ' . ': prefering ' . ($c == 1 ? "$lpkg_ver over $rpkg_ver" : "$rpkg_ver over $lpkg_ver"));
+ }
+
+ my $old_compare_pkg = \&URPM::Package::compare_pkg;
+ undef *URPM::Package::compare_pkg;
+ *URPM::Package::compare_pkg = sub {
+ my ($lpkg, $rpkg) = @_;
+ my $c = ($lpkg->release =~ /mdk$/ ? 1 : 0) - ($rpkg->release =~ /mdk$/ ? 1 : 0);
+ if ($c) {
+ prefering_mdk($lpkg, $rpkg->version . '-' . $rpkg->release, $c);
+ $c;
+ } else {
+ &$old_compare_pkg;
+ }
+ };
+
+ my $old_compare = \&URPM::Package::compare;
+ undef *URPM::Package::compare;
+ *URPM::Package::compare = sub {
+ my ($lpkg, $rpkg_ver) = @_;
+ my $c = ($lpkg->release =~ /mdk$/ ? 1 : 0) - ($rpkg_ver =~ /mdk$/ ? 1 : 0);
+ if ($c) {
+ prefering_mdk($lpkg, $rpkg_ver, $c);
+ return $c;
+ }
+ &$old_compare;
+ };
+}
+
sub beforeInstallPackages {
my ($o) = @_;
@@ -327,23 +377,36 @@ sub beforeInstallPackages {
}
}
+ #- mainly for upgrading redhat packages, but it can help other
+ my @should_not_be_dirs = qw(/usr/X11R6/lib/X11/xkb /usr/share/locale/zh_TW/LC_TIME /usr/include/GL);
+ my @should_be_dirs = qw(/etc/X11/xkb);
+ my @to_remove = (
+ (grep { !-l $_ && -d $_ } map { "$::prefix$_" } @should_not_be_dirs),
+ (grep { -l $_ || !-d $_ && -e $_ } map { "$::prefix$_" } @should_be_dirs),
+ );
+ rm_rf(@to_remove);
+
+ if ($o->{isUpgrade} eq 'redhat') {
+ upgrading_redhat();
+ }
+
#- some packages need such files for proper installation.
install_any::write_fstab($o);
require network::network;
- network::network::add2hosts("$o->{prefix}/etc/hosts", "localhost.localdomain", "127.0.0.1");
+ network::network::add2hosts("$o->{prefix}/etc/hosts", "localhost", "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";
#- add oem theme if the files exists.
mkdir_p("$o->{prefix}/usr/share");
- install_any::getAndSaveFile("Mandrake/base/oem-theme.rpm", "$o->{prefix}/usr/share/oem-theme.rpm");
+ install_any::getAndSaveFile("install/oem-theme.rpm", "$o->{prefix}/usr/share/oem-theme.rpm");
}
sub pkg_install {
my ($o, @l) = @_;
- log::l("selecting packages ".join(" ", @l));
+ log::l("selecting packages " . join(" ", @l));
require pkgs;
if ($::testing) {
log::l(qq(selecting package "$_")) foreach @l;
@@ -396,6 +459,13 @@ sub installPackages($$) { #- complete REWORK, TODO and TOCHECK!
any::writeandclean_ldsoconf($o->{prefix});
delete $ENV{DURING_INSTALL};
run_program::rooted_or_die($o->{prefix}, 'ldconfig');
+
+ eval {
+ run_program::rooted($o->{prefix}, 'gdk-pixbuf-query-loaders', '>', '/etc/gtk-2.0/gdk-pixbuf.loaders.' . (arch() =~ /64/ ? 'lib64' : 'lib'));
+ run_program::rooted($o->{prefix}, 'gtk-query-immodules-2.0', '>', '/etc/gtk-2.0/gtk.immodules.' . (arch() =~ /64/ ? 'lib64' : 'lib'));
+ run_program::rooted($o->{prefix}, 'pango-querymodules-' . (arch() =~ /64/ ? '64' : '32'), '>', '/etc/pango/' . (arch() =~ /i.86/ ? 'i386' : arch()) . '/pango.modules');
+ };
+
log::l("Install took: ", formatTimeRaw(time() - $time));
install_any::log_sizes($o);
scalar(@toInstall); #- return number of packages installed.
@@ -406,7 +476,7 @@ sub afterInstallPackages($) {
die N("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\"
+Check the cdrom on an installed computer using \"rpm -qpl media/main/*.rpm\"
") if any { 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
@@ -518,7 +588,7 @@ GridHeight=70
}
}
- any::fix_broken_alternatives();
+ any::fix_broken_alternatives($o->{isUpgrade} eq 'redhat');
#- update theme directly from a package (simplest).
if (-s "$o->{prefix}/usr/share/oem-theme.rpm") {
@@ -544,7 +614,7 @@ sub install_urpmi {
$o->{method},
$o->{packages},
$o->{packages}{mediums});
- pkgs::saveCompssUsers($o->{prefix}, $o->{packages}, $o->{compssUsers}, $o->{compssUsersSorted});
+ pkgs::saveCompssUsers($o->{prefix}, $o->{packages}, $o->{compssUsers});
}
}
@@ -561,11 +631,12 @@ sub updateModulesFromFloppy {
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 =~ m!([^/\.]*\.k?o)(?:\.gz|\.bz2)?$!;
+ my ($sfile, $sext) = $s =~ m!([^/\.]*\.k?o)(\.gz|\.bz2)?$!;
my $qsfile = quotemeta $sfile;
my $qsext = quotemeta $sext;
foreach my $target (@dest_files) {
$target =~ /$qsfile/ or next;
+ $target = "$o->{prefix}/$target";
eval { cp_af($s, $target) };
if ($@) {
log::l("updating module $target by $s failed: $@");
@@ -598,16 +669,9 @@ sub selectMouse($) {
sub configureNetwork {
my ($o) = @_;
require network::network;
- network::network::configureNetwork2($o, $o->{prefix}, $o->{netc}, $o->{intf});
+ network::network::configureNetwork2($o, $o->{modules_conf}, $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_with_perm($f, 0755, "\nif$_ eth0\n");
- }
- output "$o->{prefix}/etc/sysconfig/network-scripts/net_cnx_pg", "\n/usr/sbin/drakconnect\n";
-
- require network::netconnect;
$o->{netcnx}{$_} = $o->{netc}{$_} foreach qw(NET_DEVICE NET_INTERFACE);
}
}
@@ -631,17 +695,11 @@ sub summaryBefore {}
sub summary {
my ($o) = @_;
configureTimezone($o);
- configurePrinter($o) if $o->{printer};
+ configurePrinter($o) if $o->{printer} && $o->{printer}{SPOOLER};
}
sub summaryAfter {
- my ($o) = @_;
-
- require bootloader;
- my $acpi = bootloader::get_append($o->{bootloader}, 'acpi');
- if (!member($acpi, 'off', 'ht') && !(-x "$::prefix/usr/bin/acpi" && -x "$::prefix/usr/sbin/acpid")) {
- $o->do_pkgs->install(qw(acpi acpid));
- }
+ my ($_o) = @_;
}
#------------------------------------------------------------------------------
@@ -666,14 +724,24 @@ sub configureServices {
#------------------------------------------------------------------------------
sub configurePrinter {
my ($o) = @_;
- $o->do_pkgs->install('foomatic-filters', 'foomatic-db-engine', 'foomatic-db', 'printer-utils', 'printer-testpages',
- if_($o->do_pkgs->is_installed('gimp'), 'gimpprint'));
-
+ eval {
+ $o->do_pkgs->install('foomatic-filters', 'foomatic-db-engine', 'foomatic-db', 'printer-utils', 'printer-testpages',
+ if_($o->do_pkgs->is_installed('gimp'), 'gimpprint'));
+ };
+ if ($@ =~ /rpm not found/) {
+ log::l("ERROR: $@");
+ if ($o->{printer}) {
+ require printer::printerdrake;
+ printer::printerdrake::final_cleanup($o->{printer});
+ }
+ return;
+ }
+
require printer::main;
eval { add2hash($o->{printer} ||= {}, printer::main::getinfo($o->{prefix})) }; #- get existing configuration.
require printer::printerdrake;
- printer::printerdrake::install_spooler($o->{printer}, $o); #- not interactive...
+ printer::printerdrake::install_spooler($o->{printer}, $o->{security}, $o->do_pkgs);
foreach (values %{$o->{printer}{configured} || {}}) {
log::l("configuring printer queue " . $_->{queuedata}{queue} || $_->{QUEUE});
@@ -692,9 +760,8 @@ sub configurePrinter {
sub setRootPassword {
my ($o) = @_;
$o->{superuser} ||= {};
- $o->{superuser}{name} = 'root';
- any::write_passwd_user($o->{superuser}, $o->{authentication}{md5});
- delete $o->{superuser}{name};
+ require authentication;
+ authentication::set_root_passwd($o->{superuser}, $o->{authentication});
install_any::set_authentication($o);
}
@@ -710,45 +777,7 @@ sub addUser {
symlinkf("$::prefix/etc/group", '/etc/group');
}
- my (%uids, %gids);
- foreach (glob_("$::prefix/home")) { my ($u, $g) = (stat($_))[4,5]; $uids{$u} = 1; $gids{$g} = 1 }
-
- foreach (@$users) {
- $_->{home} ||= "/home/$_->{name}";
-
- my $u = $_->{uid} || ($_->{oldu} = (stat("$::prefix$_->{home}"))[4]) || int getpwnam($_->{name});
- my $g = $_->{gid} || ($_->{oldg} = (stat("$::prefix$_->{home}"))[5]) || int getgrnam($_->{name});
- #- search for available uid above 501 else initscripts may fail to change language for KDE.
- if (!$u || getpwuid($u)) { for ($u = 501; getpwuid($u) || $uids{$u}; $u++) {} }
- if (!$g) { for ($g = 501; getgrgid($g) || $gids{$g}; $g++) {} }
-
- $_->{uid} = $u; $uids{$u} = 1;
- $_->{gid} = $g; $gids{$g} = 1;
- }
-
- any::write_passwd_user($_, $o->{authentication}{md5}) foreach @$users;
-
- append_to_file("$::prefix/etc/group",
- map { "$_->{name}:x:$_->{gid}:\n" } grep { ! getgrgid($_->{gid}) } @$users);
-
- foreach my $u (@$users) {
- if (! -d "$::prefix$u->{home}") {
- my $mode = $o->{security} < 2 ? 0755 : 0750;
- eval { cp_af("$::prefix/etc/skel", "$::prefix$u->{home}") };
- if ($@) {
- log::l("copying of skel failed: $@"); mkdir("$::prefix$u->{home}", $mode);
- } else {
- chmod $mode, "$::prefix$u->{home}";
- }
- }
- require commands;
- eval { commands::chown_("-r", "$u->{uid}.$u->{gid}", "$::prefix$u->{home}") }
- if $u->{uid} != $u->{oldu} || $u->{gid} != $u->{oldg};
- }
- #- since we wrote the password in /etc/passwd, we must convert to shadow
- run_program::rooted($::prefix, 'pwconv') if $o->{authentication}{shadow};
-
- any::addUsers($users);
+ any::add_users($users, $o->{authentication});
if ($o->{autologin}) {
$o->{desktop} ||= first(any::sessions());
@@ -764,7 +793,7 @@ sub readBootloaderConfigBeforeInstall {
my ($o) = @_;
require bootloader;
- add2hash($o->{bootloader} ||= {}, bootloader::read());
+ add2hash($o->{bootloader} ||= {}, bootloader::read($o->{fstab}));
$o->{bootloader}{bootUnsafe} = 0 if $o->{bootloader}{boot}; #- when upgrading, don't ask where to install the bootloader (mbr vs boot partition)
}
@@ -789,11 +818,16 @@ sub setupBootloaderBefore {
if (cat_("/proc/cmdline") =~ /\b(pci)=(\S+)/) {
bootloader::set_append($o->{bootloader}, $1, $2);
}
- if (cat_("/proc/cmdline") =~ /\bacpi=off/) {
- bootloader::set_append($o->{bootloader}, acpi => 'off');
- }
- if (cat_("/proc/cmdline") =~ /\bacpi=ht/) {
- bootloader::set_append($o->{bootloader}, acpi => 'ht');
+ if (my ($acpi) = cat_("/proc/cmdline") =~ /\bacpi=(\w+)/) {
+ if ($acpi eq 'ht') {
+ #- the user is using the default, which may not be the best
+ my $year = detect_devices::dmidecode()->{BIOS_Year};
+ if (detect_devices::isLaptop() && $year >= 2002) {
+ log::l("forcing ACPI on a laptop with recent bios ($year)");
+ $acpi = 'on';
+ }
+ }
+ bootloader::set_append($o->{bootloader}, acpi => $acpi);
}
if (cat_("/proc/cmdline") =~ /\bnoapic/) {
bootloader::set_append($o->{bootloader}, 'noapic');
@@ -805,22 +839,22 @@ sub setupBootloaderBefore {
}
#- check for valid fb mode to enable a default boot with frame buffer.
- my $vga = $o->{allowFB} && (!detect_devices::matching_desc('3D Rage LT') &&
- !detect_devices::matching_desc('Rage Mobility [PL]') &&
- !detect_devices::matching_desc('i740') &&
- !detect_devices::matching_desc('Matrox') &&
- !detect_devices::matching_desc('Tseng.*ET6\d00') &&
- !detect_devices::matching_desc('SiS.*SG86C2.5') &&
- !detect_devices::matching_desc('SiS.*559[78]') &&
- !detect_devices::matching_desc('SiS.*300') &&
- !detect_devices::matching_desc('SiS.*540') &&
- !detect_devices::matching_desc('SiS.*6C?326') &&
- !detect_devices::matching_desc('SiS.*6C?236') &&
- !detect_devices::matching_desc('Voodoo [35]|Voodoo Banshee') && #- 3d acceleration seems to bug in fb mode
- !detect_devices::matching_desc('828[14][05].* CGC') #- i810 & i845 now have FB support during install but we disable it afterwards
+ my $vga = $o->{allowFB} && (!detect_devices::matching_desc__regexp('3D Rage LT') &&
+ !detect_devices::matching_desc__regexp('Rage Mobility [PL]') &&
+ !detect_devices::matching_desc__regexp('i740') &&
+ !detect_devices::matching_desc__regexp('Matrox') &&
+ !detect_devices::matching_desc__regexp('Tseng.*ET6\d00') &&
+ !detect_devices::matching_desc__regexp('SiS.*SG86C2.5') &&
+ !detect_devices::matching_desc__regexp('SiS.*559[78]') &&
+ !detect_devices::matching_desc__regexp('SiS.*300') &&
+ !detect_devices::matching_desc__regexp('SiS.*540') &&
+ !detect_devices::matching_desc__regexp('SiS.*6C?326') &&
+ !detect_devices::matching_desc__regexp('SiS.*6C?236') &&
+ !detect_devices::matching_desc__regexp('Voodoo [35]|Voodoo Banshee') && #- 3d acceleration seems to bug in fb mode
+ !detect_devices::matching_desc__regexp('828[14][05].* CGC') #- i810 & i845 now have FB support during install but we disable it afterwards
);
- my $force_vga = $o->{allowFB} && (detect_devices::matching_desc('SiS.*630') || #- SiS 630 need frame buffer.
- detect_devices::matching_desc('GeForce.*Integrated') #- needed for fbdev driver (hack).
+ my $force_vga = $o->{allowFB} && (detect_devices::matching_desc__regexp('SiS.*630') || #- SiS 630 need frame buffer.
+ detect_devices::matching_desc__regexp('GeForce.*Integrated') #- needed for fbdev driver (hack).
);
#- propose the default fb mode for kernel fb, if aurora or bootsplash is installed.
@@ -828,7 +862,7 @@ sub setupBootloaderBefore {
my $p = pkgs::packageByName($o->{packages}, 'bootsplash');
$p && $p->flag_installed;
};
- bootloader::suggest($o->{bootloader}, $o->{all_hds}{hds},
+ bootloader::suggest($o->{bootloader}, $o->{all_hds},
vga_fb => ($force_vga || $vga && $need_fb) && $o->{vga},
quiet => $o->{meta_class} ne 'server');
@@ -838,8 +872,10 @@ sub setupBootloaderBefore {
sub setupBootloader {
my ($o) = @_;
+ any::install_acpi_pkgs($o->do_pkgs, $o->{bootloader});
+
require bootloader;
- bootloader::install($o->{bootloader}, $o->{all_hds}{hds});
+ bootloader::install($o->{bootloader}, $o->{all_hds});
}
#------------------------------------------------------------------------------
@@ -854,7 +890,7 @@ sub configureX {
configureXBefore($o);
require Xconfig::default;
- $o->{raw_X} = Xconfig::default::configure($o->{keyboard}, $o->{mouse});
+ $o->{raw_X} = Xconfig::default::configure($o->do_pkgs, $o->{keyboard}, $o->{mouse});
require Xconfig::main;
Xconfig::main::configure_everything_auto_install($o->{raw_X}, $o->do_pkgs, $o->{X}, install_any::X_options_from_o($o));
@@ -925,7 +961,7 @@ sub exitInstall {
eval { output "$o->{prefix}/root/drakx/README", "This directory contains several installation-related files,
mostly log files (very useful if you ever report a bug!).
-Beware that some Mandrake tools rely on the contents of some
+Beware that some Mandrakelinux tools rely on the contents of some
of these files... so remove any file from here at your own
risk!
" };
@@ -955,7 +991,7 @@ sub upNetwork {
symlinkf("$o->{prefix}/etc/$_", "/etc/$_") foreach qw(resolv.conf protocols services);
}
member($o->{method}, qw(ftp http nfs)) and return 1;
- modules::write_conf();
+ $o->{modules_conf}->write;
if (hasNetwork($o)) {
if ($o->{netcnx}{type} =~ /adsl|lan|cable/) {
log::l("starting network ($o->{netcnx}{type})");
@@ -981,7 +1017,7 @@ sub downNetwork {
my ($o, $costlyOnly) = @_;
$o->{method} eq "ftp" || $o->{method} eq "http" || $o->{method} eq "nfs" and return 1;
- modules::write_conf();
+ $o->{modules_conf}->write;
if (hasNetwork($o)) {
if (!$costlyOnly) {
require network::netconnect;