From ef51eac4189ef00ce6d79fcceabd7109e870899a Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 9 May 2008 17:25:25 +0000 Subject: [PATCH] -Fix problem where packimage would not ensure only one variant of a profile packed git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1339 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/packimage.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/packimage.pm b/xCAT-server-2.0/lib/xcat/plugins/packimage.pm index 8288dc018..f42effe17 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/packimage.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/packimage.pm @@ -114,14 +114,15 @@ sub process_request { $callback->({error=>["$installroot/netboot/$osver/$arch/$profile/rootimg does not exist, run genimage -o $osver -p $profile on a server with matching architecture"]}); return; } + unlink("$installroot/netboot/$osver/$arch/$profile/rootimg.gz"); + unlink("$installroot/netboot/$osver/$arch/$profile/rootimg.sfs"); + unlink("$installroot/netboot/$osver/$arch/$profile/rootimg.nfs"); if ($method =~ /cpio/) { $excludestr =~ s!-a \z!|cpio -H newc -o | gzip -c - > ../rootimg.gz!; - unlink("$installroot/netboot/$osver/$arch/$profile/rootimg.gz"); $oldmask = umask 0077; } elsif ($method =~ /squashfs/) { $temppath = mkdtemp("/tmp/packimage.$$.XXXXXXXX"); $excludestr =~ s!-a \z!|cpio -dump $temppath!; - unlink("$installroot/netboot/$osver/$arch/$profile/rootimg.sfs"); } elsif ($method =~ /nfs/) { $excludestr = "touch ../rootimg.nfs"; } else {