2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-21 05:25:32 +00:00

Fix flags for squashfs for centos

This commit is contained in:
Mark Gurevich
2020-04-21 09:37:23 -04:00
parent e74d175dab
commit 72cf0e15d3

View File

@ -580,7 +580,7 @@ sub process_request {
$flags = "-be";
}
if ($osver =~ /rhels/ && $osver !~ /rhels5/) {
if (($osver =~ /rhels/ && $osver !~ /rhels5/) || ($osver =~ /centos/)) {
$flags = "";
}
@ -588,9 +588,10 @@ sub process_request {
$callback->({ error => ["mksquashfs not found, squashfs-tools rpm should be installed on the management node"], errorcode => [1] });
return 1;
}
my $rc = system("mksquashfs $temppath ../rootimg.sfs $flags");
my $mksquashfs_command = "mksquashfs $temppath ../rootimg.sfs $flags";
my $rc = system("$mksquashfs_command");
if ($rc) {
$callback->({ error => ["mksquashfs could not be run successfully"], errorcode => [1] });
$callback->({ error => ["Command \"$mksquashfs_command\" failed"], errorcode => [1] });
return 1;
}
$rc = system("rm -rf $temppath");