diff options
author | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2015-02-24 17:38:17 +0000 |
---|---|---|
committer | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2015-02-27 17:28:39 +0000 |
commit | 16b3c231f2dcfe6474909d78a0b267601ddd17e3 (patch) | |
tree | e28c7ae0b31ab6b5ff3ba5336abecd07e63f4542 /pxeboot.write | |
parent | a6d7d3a8537215d0315a8dad66565ba26294b8b8 (diff) | |
download | definitions-16b3c231f2dcfe6474909d78a0b267601ddd17e3.tar.gz |
pxeboot: improve compatibility with u-boot pxe
u-boot pxe doesn't understand the tftp:// URIs. Workaround by making the
kernel download URL in the pxelinux.cfg file to be of the following form:
<HOST>:<KERNEL_RELATIVE_PATH>
Diffstat (limited to 'pxeboot.write')
-rwxr-xr-x | pxeboot.write | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pxeboot.write b/pxeboot.write index 3fdda5f2..8c46bcbe 100755 --- a/pxeboot.write +++ b/pxeboot.write @@ -415,7 +415,8 @@ class PXEBoot(morphlib.writeexts.WriteExtension): def remote_pxeboot_config(self, tftproot, kernel_tftproot, kernel_subpath, rootfs_nfsroot, rootfs_subpath, macaddr): rootfs_nfs_url = '{}/{}'.format(rootfs_nfsroot, rootfs_subpath) - kernel_tftp_url = '{}/{}'.format(kernel_tftproot, kernel_subpath) + url = urlparse.urlsplit(kernel_tftproot) + kernel_tftp_url = '{}:{}'.format(url.netloc, kernel_subpath) pxe_cfg_filename = _normalise_macaddr(macaddr) url = urlparse.urlsplit(tftproot) inst_cfg_path = os.path.join(url.path, 'pxelinux.cfg') |