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 15:25:24 +0000 |
commit | 701d63e60978d3a45d0cb68d204c57cbb5ba313c (patch) | |
tree | 186f1f7e0287a0e3e615873816f643a390ec9d82 | |
parent | dec2cf814454b9acd048c0bce0c9f20d63f2a6a9 (diff) | |
download | definitions-701d63e60978d3a45d0cb68d204c57cbb5ba313c.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>
-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') |