diff --git a/xCAT-server/lib/xcat/plugins/packimage.pm b/xCAT-server/lib/xcat/plugins/packimage.pm index aa783fd86..fa2980e61 100755 --- a/xCAT-server/lib/xcat/plugins/packimage.pm +++ b/xCAT-server/lib/xcat/plugins/packimage.pm @@ -591,7 +591,8 @@ sub process_request { return 1; } my $mksquashfs_command = "mksquashfs $temppath ../rootimg.sfs $flags"; - my $rc = system("$mksquashfs_command"); + xCAT::Utils->runcmd($mksquashfs_command, 0, 1); + my $rc = $::RUNCMD_RC; if ($rc) { $callback->({ error => ["Command \"$mksquashfs_command\" failed"], errorcode => [1] }); return 1;