summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
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/any.pm
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/any.pm')
-rw-r--r--perl-install/any.pm5
1 files changed, 4 insertions, 1 deletions
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));
}
}