mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-21 19:22:05 +00:00
Detect SLES15 when running detect_dhcpd xcatprobe
This commit is contained in:
parent
1e4b103223
commit
4614bbe515
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user