mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 17:23:08 +00:00
Merge pull request #7039 from gurevichmark/xcatprobe-makedhcp
Better xcatprobe message when makedhcp -q returns no output
This commit is contained in:
commit
033f8ae900
@ -1143,8 +1143,15 @@ sub check_dhcp_service {
|
||||
last;
|
||||
}
|
||||
chomp($tmp);
|
||||
if (length($tmp) == 0) {
|
||||
# makedhcp -q did not return anything, and RC was 0
|
||||
push @$error_ref, "DHCP server returned no data for 'makedhcp -q xcatmntest'";
|
||||
returncmdoutput($tmp, $error_ref) if ($verbose);
|
||||
$rc = 1;
|
||||
last;
|
||||
}
|
||||
if ($tmp !~ /xcatmntest: ip-address = $serverip, hardware-address = aa:aa:aa:aa:aa:aa/) {
|
||||
push @$error_ref, "DHCP server reply is wrong";
|
||||
push @$error_ref, "DHCP server reply does not match expected IP and MAC";
|
||||
returncmdoutput($tmp, $error_ref) if ($verbose);
|
||||
$rc = 1;
|
||||
`makedhcp -d xcatmntest 2>&1 && rmdef xcatmntest 2>&1`;
|
||||
|
Loading…
x
Reference in New Issue
Block a user