summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2012-04-14 19:25:22 +0000
committerColin Guthrie <colin@mageia.org>2012-04-14 19:25:22 +0000
commita962a70b7c9eb5379572584b560f16e555373cfd (patch)
tree9d7a10df066d96dde865413a594296bcdb1333d8 /perl-install
parente088be601e49be4673a1ead270cb91961929a195 (diff)
downloaddrakx-a962a70b7c9eb5379572584b560f16e555373cfd.tar
drakx-a962a70b7c9eb5379572584b560f16e555373cfd.tar.gz
drakx-a962a70b7c9eb5379572584b560f16e555373cfd.tar.bz2
drakx-a962a70b7c9eb5379572584b560f16e555373cfd.tar.xz
drakx-a962a70b7c9eb5379572584b560f16e555373cfd.zip
ensure swap partition is activated in dracut (e.g. for swap on LVM, RAID etc)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/any.pm5
2 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index a03cd4eee..a437f1aa9 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,5 +1,6 @@
- interactive::curses:
o make sure ranges are always within limits (mga#646)
+- ensure swap partition is activated in dracut (e.g. for swap on LVM, RAID etc)
Version 14.3 - 7 April 2012
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 656612f0b..67a8481d5 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -176,7 +176,10 @@ sub setupBootloaderBefore {
} elsif (bootloader::get_append_simple($bootloader, 'noresume')) {
} else {
if (my ($biggest_swap) = sort { $b->{size} <=> $a->{size} } grep { isSwap($_) } @$fstab) {
- bootloader::set_append_with_key($bootloader, resume => fs::wild_device::from_part('', $biggest_swap));
+ my $biggest_swap_dev = fs::wild_device::from_part('', $biggest_swap);
+ bootloader::set_append_with_key($bootloader, resume => $biggest_swap_dev);
+ mkdir_p("$::prefix/etc/dracut.conf.d");
+ output("$::prefix/etc/dracut.conf.d/51-mageia-resume.conf", qq(add_device+="$biggest_swap_dev"\n));
}
}