diff options
author | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2015-02-25 16:16:30 +0000 |
---|---|---|
committer | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2015-02-27 17:28:39 +0000 |
commit | edd80e91c1105657f93163b614faef66c80a98c2 (patch) | |
tree | 274987c7633ff11e85dbf58091831d1e9def5aa1 | |
parent | 226129ec54cdcbee879076c535c3834b98a07a9a (diff) | |
download | definitions-edd80e91c1105657f93163b614faef66c80a98c2.tar.gz |
pxeboot: improve naming of remote rootfs directories
Construct its name based on the MAC address of the NIC, as it is
already being done for the kernel and device tree blob.
-rwxr-xr-x | pxeboot.write | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pxeboot.write b/pxeboot.write index 06c44a31..399914f5 100755 --- a/pxeboot.write +++ b/pxeboot.write @@ -393,7 +393,8 @@ class PXEBoot(morphlib.writeexts.WriteExtension): @contextlib.contextmanager def remote_nfsroot(self, rootfs, rsync_url, macaddr): url = urlparse.urlsplit(rsync_url) - template = os.path.join(url.path, 'nfsroot.XXXXXXXXXX') + template = os.path.join(url.path, + _normalise_macaddr(macaddr) + '.XXXXXXXXXX') with self._remote_tempdir(hostname=url.hostname, template=template) \ as tempdir: nfsroot = urlparse.urlunsplit((url.scheme, url.netloc, tempdir, |