summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-08-18 08:51:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-08-18 08:51:59 +0000
commit37ade89f394d420d645abf89c7bd7e4a8e992415 (patch)
treebf405417d112c9b7bc815a815a951e92c340d60c /perl-install/install_steps.pm
parent56032e485e9659bdf844fc8745f7f19cf8dc411c (diff)
downloaddrakx-backup-do-not-use-37ade89f394d420d645abf89c7bd7e4a8e992415.tar
drakx-backup-do-not-use-37ade89f394d420d645abf89c7bd7e4a8e992415.tar.gz
drakx-backup-do-not-use-37ade89f394d420d645abf89c7bd7e4a8e992415.tar.bz2
drakx-backup-do-not-use-37ade89f394d420d645abf89c7bd7e4a8e992415.tar.xz
drakx-backup-do-not-use-37ade89f394d420d645abf89c7bd7e4a8e992415.zip
force ACPI on a laptop with recent bios
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm15
1 files changed, 10 insertions, 5 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 04b1f55a0..e3e66ee4c 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -837,11 +837,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');