diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-09-24 13:36:50 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-09-24 13:36:50 +0000 |
commit | 608f8fc1b8991a58ae10ddaeb5c0751eed14ec75 (patch) | |
tree | cf3ff2da6c41d98d11801188818e92be1e7bad81 /perl-install/any.pm | |
parent | c818c41c6322e65ac9175f207c6c4249700a8c76 (diff) | |
download | drakx-608f8fc1b8991a58ae10ddaeb5c0751eed14ec75.tar drakx-608f8fc1b8991a58ae10ddaeb5c0751eed14ec75.tar.gz drakx-608f8fc1b8991a58ae10ddaeb5c0751eed14ec75.tar.bz2 drakx-608f8fc1b8991a58ae10ddaeb5c0751eed14ec75.tar.xz drakx-608f8fc1b8991a58ae10ddaeb5c0751eed14ec75.zip |
- on upgrade, don't add resume=xxx if noresume is there (#33953)
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r-- | perl-install/any.pm | 15 |
1 files changed, 10 insertions, 5 deletions
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})); + } } } |