The install_pxe_bootloader_to_run_dir procedure is required by the tftp as well as the ipxe load script. Move it to a separate file which is include by both.