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

Add a section to attempt to autodetect the RHEL OS to bypass (#1644)

the need to update the discinfo database
This commit is contained in:
Victor Hu
2016-08-08 00:21:06 -04:00
committed by yangsong
parent 9d0f0fb677
commit 878d43addc

View File

@@ -2239,17 +2239,27 @@ sub copycd
}
}
unless ($distname)
{
print "INFO - Could not find ID=$did in the discinfo database for OS=$desc ARCH=$darch NUM=$dno, attempt to auto-detect...\n";
if ($desc =~ /IBM_PowerKVM/)
{
# check for PowerKVM support
my @pkvm_version = split / /, $desc;
$distname = "pkvm" . $pkvm_version[1];
}
elsif ($desc =~ /Red Hat Enterprise Linux/)
{
#
# Attempt to auto-detect for RHEL OS.
# RHEL 7.3 description is: Red Hat Enterprise Linux 7.3
#
my @rhel_version = split / /, $desc;
$distname = "rhels" . $rhel_version[4];
}
else
{
print "INFO - Could not auto-detect operating system.\n";
return; #Do nothing, not ours..
}
}