+ my $tftp_root = "$builddir";
+ $tftp_root = "$server" if(defined $server);
+
+ # Prepare a GRUB netboot directory
+ system_verbose("grub-mknetdir --net-directory=$tftp_root") if (defined $grub2_config);
+
+ # Generate TFTP mapfile
+ open(my $fh, '>', "$tftp_root/mapfile");
+ print $fh "# Some PXE clients (mainly UEFI) have bug. They add zero byte to the end of the
+# path name. This rule removes it
+r \\.efi.* \\.efi";
+ close($fh);