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.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})) {