2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-03 03:50:08 +00:00

Merge pull request #6685 from gurevichmark/squashfs_testcase3

Make sure squashfs installed on SLES for squashfs testcase
This commit is contained in:
cxhong 2020-04-29 18:06:30 -04:00 committed by GitHub
commit 59065ca2fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View File

@ -585,7 +585,11 @@ sub process_request {
}
if (!-x "/sbin/mksquashfs" && !-x "/usr/bin/mksquashfs") {
$callback->({ error => ["mksquashfs not found, squashfs-tools rpm should be installed on the management node"], errorcode => [1] });
if ($osver =~ /sle/) {
$callback->({ error => ["mksquashfs not found, squashfs rpm should be installed on the management node"], errorcode => [1] });
} else {
$callback->({ error => ["mksquashfs not found, squashfs-tools rpm should be installed on the management node"], errorcode => [1] });
}
return 1;
}
my $mksquashfs_command = "mksquashfs $temppath ../rootimg.sfs $flags";

View File

@ -133,6 +133,9 @@ cmd:rm -rf /tmp/mountoutput
#Make sure squashfs-tools rpm is installed on Ubuntu
cmd:if [ "$$OS" = "ubuntu" ];then apt-get install -y squashfs-tools; fi
#Make sure squashfs rpm is installed on SLES
cmd:if [ "$$OS" = "sle" ];then zypper install -y squashfs; fi
cmd:packimage -m squashfs __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
check:output=~archive method:squashfs

View File

@ -156,6 +156,9 @@ check:rc==0
#Make sure squashfs-tools rpm is installed on Ubuntu
cmd:if [ "$$OS" = "ubuntu" ];then apt-get install -y squashfs-tools; fi
#Make sure squashfs rpm is installed on SLES
cmd:if [ "$$OS" = "sle" ];then zypper install -y squashfs; fi
cmd:packimage -m squashfs __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
check:output=~archive method:squashfs