From 608f8fc1b8991a58ae10ddaeb5c0751eed14ec75 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 24 Sep 2007 13:36:50 +0000 Subject: - on upgrade, don't add resume=xxx if noresume is there (#33953) --- perl-install/any.pm | 15 ++++++++++----- perl-install/install/NEWS | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'perl-install') diff --git a/perl-install/any.pm b/perl-install/any.pm index cdd775b8a..1562df6bd 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -163,11 +163,16 @@ sub setupBootloaderBefore { if (cat_("/proc/cmdline") =~ /\bnoapic/) { bootloader::set_append_simple($bootloader, 'noapic'); } - my ($MemTotal) = cat_("/proc/meminfo") =~ /^MemTotal:\s*(\d+)/m; - if (my ($biggest_swap) = sort { $b->{size} <=> $a->{size} } grep { isSwap($_) } @$fstab) { - log::l("MemTotal: $MemTotal < ", $biggest_swap->{size} / 2); - if ($MemTotal < $biggest_swap->{size} / 2) { - bootloader::set_append_with_key($bootloader, resume => devices::make($biggest_swap->{device})); + if (cat_("/proc/cmdline") =~ /\bnoresume/) { + bootloader::set_append_simple($bootloader, 'noresume'); + } elsif (bootloader::get_append_simple($bootloader, 'noresume')) { + } else { + my ($MemTotal) = cat_("/proc/meminfo") =~ /^MemTotal:\s*(\d+)/m; + if (my ($biggest_swap) = sort { $b->{size} <=> $a->{size} } grep { isSwap($_) } @$fstab) { + log::l("MemTotal: $MemTotal < ", $biggest_swap->{size} / 2); + if ($MemTotal < $biggest_swap->{size} / 2) { + bootloader::set_append_with_key($bootloader, resume => devices::make($biggest_swap->{device})); + } } } diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 495926a5d..2b1e2cac5 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,4 @@ +- on upgrade, don't add resume=xxx if noresume is there (#33953) - diskdrake o fix "Add to LVM" - do not display any message when user screenshot when chrooted during install -- cgit v1.2.1