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

Make makedhcp working on RHEL 8 xCAT management node (#5930)

* Patch dhcp.pm for RHEL 8

* Ignore interface lo while makenetworks

* Revise the comments to reflect the code changes
This commit is contained in:
Gᴏɴɢ Jie
2019-01-08 15:54:47 +08:00
committed by Bin Xu
parent 84e59d7503
commit efc60c8825
2 changed files with 9 additions and 4 deletions

View File

@ -1757,7 +1757,7 @@ sub process_request
my $os_ver = $os;
$os_ver =~ s/[^0-9.^0-9]//g;
if (($os =~ /sles/i && $os_ver >= 11) ||
($os =~ /rhels/i && $os_ver >= 7)) {
($os =~ /rhels?/i && $os_ver >= 7)) {
$dhcpd_key = "DHCPD_INTERFACE";
if ($usingipv6 and $dhcpver eq "dhcpd6") {
@ -1825,7 +1825,10 @@ sub process_request
if ($usingipv6) {
# sles11.3 and rhels7 has dhcpd and dhcpd6 config in the dhcp file
if ($os =~ /sles/i || $os =~ /rhels7/i) {
my $os_ver = $os;
$os_ver =~ s/[^0-9.^0-9]//g;
if (($os =~ /sles/i && $os_ver >= 11) ||
($os =~ /rhels?/i && $os_ver >= 7)) {
if ($missingfiles{dhcpd}) {
$callback->({ error => ["The file /etc/sysconfig/dhcpd doesn't exist, check the dhcp server"] });
}

View File

@ -391,9 +391,11 @@ sub donets
foreach (@ip6table)
{
my @ent = split /\s+/, $_;
if ($ent[0] eq 'fe80::/64' or $ent[0] eq 'unreachable' or $ent[1] eq 'via') {
if ($ent[0] eq 'fe80::/64' or $ent[0] eq 'unreachable' or
$ent[1] eq 'via' or $ent[2] eq 'lo') {
#Do not contemplate link-local, unreachable, or gatewayed networks further
#Do not contemplate link-local, unreachable, gatewayed networks,
# or networks connected to loopback interface
#DHCPv6 relay will be manually entered into networks as was the case for IPv4
next;
}