2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 17:46:38 +00:00

Merge pull request #6778 from cxhong/packimg

Use xcat runcmd instead of system() call for mksquash command
This commit is contained in:
peterwywong 2020-07-22 21:08:54 -05:00 committed by GitHub
commit 7739dcad5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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