diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-08-19 15:34:39 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-08-19 15:34:39 +0000 |
commit | 4087f83da6a0027c4fbea8e1321819da13296a7b (patch) | |
tree | 31f9ed4b320518015ea3cf4ae04517a2ed9951ca /perl-install/install_steps.pm | |
parent | e24dd7f143e1450c8ab9d6099ec683163db3fe78 (diff) | |
download | drakx-4087f83da6a0027c4fbea8e1321819da13296a7b.tar drakx-4087f83da6a0027c4fbea8e1321819da13296a7b.tar.gz drakx-4087f83da6a0027c4fbea8e1321819da13296a7b.tar.bz2 drakx-4087f83da6a0027c4fbea8e1321819da13296a7b.tar.xz drakx-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.pm | 5 |
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})) { |