diff --git a/kickstart/files/kickstart.cfg b/kickstart/files/kickstart.cfg index 6f179900..16ac6331 100644 --- a/kickstart/files/kickstart.cfg +++ b/kickstart/files/kickstart.cfg @@ -2719,31 +2719,16 @@ else # vlan ilog "Configuring vlan: boot_iface=vlan${mgmt_vlan}" # Check whether to use inet or inet6 - ipv6_addr=$(dig +short AAAA controller.internal) - - if [[ -z "${ipv6_addr}" ]] + # Check for IPv4 format (3 digits followed by a dot, repeated 3 times, and another 3 digits) + if [[ $mgmt_ip =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then - # during an upgrade the controller.internal may not be defined - # but the scenario could be IPv6. So try to resolve the controller - ipv6_addr=$(dig +short AAAA controller) - - # due to the alias in the /etc/dnsmasq.conf: - # cname=controller,controller.internal - # An IPv4 scenario may answer "controller.internal." even for an IPv6 DIG - # for this reason, remove the "controller.internal." from the result - fqdn_pattern="controller.internal." - ipv6_addr=${ipv6_addr/${fqdn_pattern}/} - fi - - if [[ -n "${ipv6_addr}" ]] - then - boot_address_family=inet6 - ipv6init=yes - dhcpv6c=yes - else boot_address_family=inet ipv6init=no dhcpv6c=no + else + boot_address_family=inet6 + ipv6init=yes + dhcpv6c=yes fi # Persist the boot device to the platform configuration. This will get