fai-chboot patch proposal : Choose kernel from the corresponding nfsroot

Thomas Lange lange at informatik.uni-koeln.de
Thu Sep 17 18:01:19 CEST 2015


>>>>> On Fri, 11 Sep 2015 09:20:47 +0200, Prunk Dump <prunkdump at gmail.com> said:

    > if ($opt_i || $opt_s) {
    >    $kernelsuffix = (glob "$nfsroot/boot/vmlinuz*$opt_s")[-1];
    >    if ! $kernelsuffix {
    >       $kernelsuffix = (glob "$tftproot/vmlinuz*$opt_s")[-1];
    >    }
    > $kernelsuffix=~ s/.+vmlinuz-//;
    > die "No kernel found matching $tftproot/vmlinuz*$opt_s\n" unless $kernelsuffix;
    > }

Nice idea. I've implemented it this way:

 if ($opt_i || $opt_s) {
-  $kernelsuffix = (glob "$tftproot/vmlinuz*$opt_s")[-1];
+  $kernelsuffix = (glob "$nfsroot/boot/vmlinuz*$opt_s")[-1];
+  $kernelsuffix //= (glob "$tftproot/vmlinuz*$opt_s")[-1];
   $kernelsuffix=~ s/.+vmlinuz-//;
   die "No kernel found matching $tftproot/vmlinuz*$opt_s\n" unless $kernelsuffix;
 }

-- 
regards Thomas


More information about the linux-fai mailing list