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);