From 4087f83da6a0027c4fbea8e1321819da13296a7b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 19 Aug 2003 15:34:39 +0000 Subject: add resume=/dev/XXX where /dev/XXX is the swap partition (when the swap partition is bigger than ram size) --- perl-install/install_steps.pm | 5 +++++ 1 file changed, 5 insertions(+) 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})) { -- cgit v1.2.1