summaryrefslogtreecommitdiffstats
path: root/perl-install/patch/9.1/patch-loopback.pl
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/patch/9.1/patch-loopback.pl')
-rw-r--r--perl-install/patch/9.1/patch-loopback.pl18
1 files changed, 18 insertions, 0 deletions
diff --git a/perl-install/patch/9.1/patch-loopback.pl b/perl-install/patch/9.1/patch-loopback.pl
new file mode 100644
index 000000000..d0f4185b3
--- /dev/null
+++ b/perl-install/patch/9.1/patch-loopback.pl
@@ -0,0 +1,18 @@
+use bootloader;
+package bootloader;
+log::l("PATCHING: fixing 9.1 aes.o missing in initrd for / on loopback");
+
+*mkinitrd = sub {
+ my ($kernelVersion, $initrdImage) = @_;
+
+ my $loop_boot = loopback::prepare_boot();
+
+ modules::load('loop');
+ if (!run_program::rooted($::prefix, "mkinitrd", "--with=aes", "-v", "-f", $initrdImage, "--ifneeded", $kernelVersion)) {
+ unlink("$::prefix/$initrdImage");
+ die "mkinitrd failed";
+ }
+ loopback::save_boot($loop_boot);
+
+ -e "$::prefix/$initrdImage";
+};