mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-21 19:22:05 +00:00
Merge pull request #363 from whowutwut/dhcpd6
makedhcp -n on rhels7 complains about missing dhcpd6 file
This commit is contained in:
commit
3cbe9d7f83
@ -1604,10 +1604,15 @@ sub process_request
|
||||
my $generatedpath = "$syspath/$dhcpver";
|
||||
my $dhcpd_key = "DHCPDARGS";
|
||||
|
||||
if ($os =~ /sles/i) {
|
||||
# For SLES11+ and RHEL7+ Operating system releases, the
|
||||
# dhcpd/dhcpd6 configuration is stored in the same file
|
||||
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)) {
|
||||
|
||||
$dhcpd_key = "DHCPD_INTERFACE";
|
||||
if ($usingipv6 and $dhcpver eq "dhcpd6") {
|
||||
# For SLES, the dhcpd6 "dhcpver" is going to modify the dhcpd conf file with key=DHCPD6_INTERFACE
|
||||
$dhcpd_key = "DHCPD6_INTERFACE";
|
||||
$generatedpath = "$syspath/dhcpd";
|
||||
}
|
||||
@ -1667,8 +1672,8 @@ sub process_request
|
||||
}
|
||||
|
||||
if ($usingipv6) {
|
||||
# sles had dhcpd and dhcpd6 config in the dhcp file
|
||||
if ($os =~ /sles/i) {
|
||||
# sles11.3 and rhels7 has dhcpd and dhcpd6 config in the dhcp file
|
||||
if ($os =~ /sles/i || $os =~ /rhels7/i) {
|
||||
if ($missingfiles{dhcpd}) {
|
||||
$callback->({error=>["The file /etc/sysconfig/dhcpd doesn't exist, check the dhcp server"]});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user