summaryrefslogtreecommitdiffstats
path: root/perl-install/patch/9.1/patch-loopback.pl
blob: d0f4185b31d4fc00c5fefaf8c2d6a9a585c625a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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";
};