]> rtime.felk.cvut.cz Git - novaboot.git/commitdiff
Die in case of multiple initrds for the Linux kernel
authorMichal Sojka <michal.sojka@cvut.cz>
Fri, 11 Jun 2021 10:42:30 +0000 (12:42 +0200)
committerMichal Sojka <michal.sojka@cvut.cz>
Mon, 28 Jun 2021 06:18:02 +0000 (08:18 +0200)
novaboot

index 1fdfd52e9eea29c831c02d207591a0fa66a5c26d..0c5d539a6c0aeb2d532b73a662e356dd818b20c5 100755 (executable)
--- a/novaboot
+++ b/novaboot
@@ -584,6 +584,7 @@ sub generate_grub2_config($$$$;$$)
     my $module_load_method = "module";
     if ($boot_method eq "linux") {
        $module_load_method = "initrd";
+       die('Too many "load" lines for Linux kernel') if (scalar(@$modules_ref) > 2);
     }
     foreach (@$modules_ref) {
        if ($first) {