From 2c3bb55e80f332b869ec24023db85b7a3a6e8613 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 7 May 2008 19:48:09 +0000 Subject: [PATCH] -Resolve bug 1959592, packimage temp directory is now reaped git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1319 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/packimage.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xCAT-server-2.0/lib/xcat/plugins/packimage.pm b/xCAT-server-2.0/lib/xcat/plugins/packimage.pm index 756b29004..1cf2fb59f 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/packimage.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/packimage.pm @@ -142,6 +142,11 @@ sub process_request { $callback->({error=>["mksquashfs could not be run successfully"],errorcode=>[1]}); return; } + $rc = system("rm -rf $temppath"); + if ($rc) { + $callback->({error=>["Failed to clean up temp space"],errorcode=>[1]}); + return; + } chmod(0644,"../rootimg.sfs"); } chdir($oldpath);