2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

Detect SLES15 when running detect_dhcpd xcatprobe

This commit is contained in:
Mark Gurevich 2022-03-07 15:17:07 -05:00
parent 1e4b103223
commit 4614bbe515

View File

@ -96,19 +96,21 @@ if (!$IP || !$MAC) {
}
# check the distro
$msg = "The operating system on current server is supported";
$msg = "The operating system on current server is not supported";
my $os;
if (-f "/etc/redhat-release") {
$os = "rh";
} elsif (-f "/etc/SuSE-release") {
$os = "sles";
} elsif (-f "/etc/SUSE-brand") {
$os = "sles";
} elsif (-f "/etc/lsb-release") {
$os = "ubuntu";
#} elsif (-f "/etc/debian_version") {
# $os = "debian";
} else {
probe_utils->send_msg("$output", "f", $msg);
probe_utils->send_msg("$output", "d", "Only support the RedHat, SLES and Ubuntu.");
probe_utils->send_msg("$output", "d", "Only supported on RedHat, SLES and Ubuntu.");
exit 1;
}
probe_utils->send_msg("$output", "d", "Current operating system is $os") if ($::VERBOSE);