From 80e345be970fbbde066317ff0a5fb6f71addd7d4 Mon Sep 17 00:00:00 2001 From: Tiago Gomes Date: Wed, 25 Feb 2015 16:16:30 +0000 Subject: 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. --- pxeboot.write | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pxeboot.write b/pxeboot.write index cefe8afb..fcfd743e 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, -- cgit v1.2.1