2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-01 19:17:06 +00:00

Merge pull request #7124 from gurevichmark/xcatprobe_detect_dhcpd

Detect SLES15 when running detect_dhcpd xcatprobe
This commit is contained in:
besawn 2022-03-07 15:24:21 -05:00 committed by GitHub
commit a2c03bcbcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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