From 3fa832cc4576eeda0d4428e44f9ff9c59bb3a0ee Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 13 May 2008 23:40:05 +0000 Subject: [PATCH] -Have anaconda platform distributions not redundantly copy file during nodeset netboot git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1383 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/anaconda.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT-server-2.0/lib/xcat/plugins/anaconda.pm b/xCAT-server-2.0/lib/xcat/plugins/anaconda.pm index b643bb722..9b0cc65d6 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/anaconda.pm @@ -151,6 +151,7 @@ sub mknetboot $installroot = $ref->{value}; } } + my %donetftp=(); foreach $node (@nodes) { my $ent = $ostab->getNodeAttribs($node, ['os', 'arch', 'profile']); @@ -219,10 +220,13 @@ sub mknetboot mkpath("/$tftpdir/xcat/netboot/$osver/$arch/$profile/"); #TODO: only copy if newer... + unless ($donetftp{$osver,$arch,$profile}) { copy("/$installroot/netboot/$osver/$arch/$profile/kernel", "/$tftpdir/xcat/netboot/$osver/$arch/$profile/"); copy("/$installroot/netboot/$osver/$arch/$profile/initrd.gz", "/$tftpdir/xcat/netboot/$osver/$arch/$profile/"); + $donetftp{$osver,$arch,$profile} = 1; + } unless ( -r "/$tftpdir/xcat/netboot/$osver/$arch/$profile/kernel" and -r "/$tftpdir/xcat/netboot/$osver/$arch/$profile/initrd.gz") {