From 4dcdd835b00bbaaba3be563793ef6f7fb78b51ce Mon Sep 17 00:00:00 2001 From: Martin Gracik Date: Tue, 2 Nov 2010 14:06:55 +0100 Subject: [PATCH] Make initrd hard link Don't copy initrd to both isolinux anx pxeboot directory. Create a hard link in isolinux instead. --- src/pylorax/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py index f85ae59a..87d337a0 100644 --- a/src/pylorax/__init__.py +++ b/src/pylorax/__init__.py @@ -381,10 +381,14 @@ class Lorax(BaseLoraxClass): else: logger.info("took {0:.2f} seconds".format(elapsed)) - # XXX copy initrd to isolinuxdir and pxebootdir - shutil.copy2(initrd.fpath, self.outputtree.isolinuxdir) + # copy initrd to pxebootdir shutil.copy2(initrd.fpath, self.outputtree.pxebootdir) + # make initrd hardlink in isolinuxdir + source = joinpaths(self.outputtree.pxebootdir, initrd.fname) + link_name = joinpaths(self.outputtree.isolinuxdir, initrd.fname) + os.link(source, link_name) + # create efi images efiboot = None if grubefi: