From 2f7cd346a8796c1fccad16e73bbfcee4d0d3f8ef Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 28 Feb 2008 02:11:40 +0000 Subject: [PATCH] Give error when mksquashfs fails git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@610 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/packimage.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/packimage.pm b/xCAT-server-2.0/lib/xcat/plugins/packimage.pm index 4e29c05f4..8cb82d59b 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/packimage.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/packimage.pm @@ -93,7 +93,11 @@ sub process_request { } elsif ($arch =~ /ppc/) { $flags="-be"; } - system("mksquashfs $temppath ../rootimg.sfs $flags"); + my $rc = system("mksquashfs $temppath ../rootimg.sfs $flags"); + if ($rc) { + $callback->({error=>["mksquashfs could not be run successfully"],errorcode=>[1]}); + return; + } chmod(0644,"../rootimg.sfs"); } chdir($oldpath);