summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-08-19 15:34:39 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-08-19 15:34:39 +0000
commit4087f83da6a0027c4fbea8e1321819da13296a7b (patch)
tree31f9ed4b320518015ea3cf4ae04517a2ed9951ca /perl-install/install_steps.pm
parente24dd7f143e1450c8ab9d6099ec683163db3fe78 (diff)
downloaddrakx-backup-do-not-use-4087f83da6a0027c4fbea8e1321819da13296a7b.tar
drakx-backup-do-not-use-4087f83da6a0027c4fbea8e1321819da13296a7b.tar.gz
drakx-backup-do-not-use-4087f83da6a0027c4fbea8e1321819da13296a7b.tar.bz2
drakx-backup-do-not-use-4087f83da6a0027c4fbea8e1321819da13296a7b.tar.xz
drakx-backup-do-not-use-4087f83da6a0027c4fbea8e1321819da13296a7b.zip
add resume=/dev/XXX where /dev/XXX is the swap partition (when the swap partition is bigger than ram size)
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 3d1b83e23..88becd7bf 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -888,6 +888,11 @@ sub setupBootloaderBefore {
if (cat_("/proc/cmdline") =~ /\bnoapic/) {
bootloader::set_append($o->{bootloader}, 'noapic');
}
+ my ($MemTotal) = cat_("/proc/meminfo") =~ /^MemTotal:\s*(\d+)/m;
+ if (my ($biggest_swap) = sort { $b->{size} <=> $a->{size} } grep { isSwap($_) } @{$o->{fstab}}) {
+ log::l("MemTotal: $MemTotal < ", $biggest_swap->{size} / 2);
+ bootloader::set_append($o->{bootloader}, resume => devices::make($biggest_swap->{device})) if $MemTotal < $biggest_swap->{size} / 2;
+ }
if (arch() =~ /alpha/) {
if (my $dev = fsedit::get_root($o->{fstab})) {