From 48e8ef2d5d4a58e4299efba591e466b32a891749 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Thu, 2 Nov 2023 18:11:11 +0100 Subject: [PATCH] Fixing snippets/tpl.040.network.sh --- snippets/tpl.040.network.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/snippets/tpl.040.network.sh b/snippets/tpl.040.network.sh index 69c0154..82639a9 100644 --- a/snippets/tpl.040.network.sh +++ b/snippets/tpl.040.network.sh @@ -82,6 +82,12 @@ create_networkconfig() { local dev_basename="${DEVNAME_ETH0}.nmconnection" local dev_file="${tmp_nw_script_dir}/${dev_basename}" + local redhat_major_version=$( cat /etc/os-release | grep '^VERSION_ID=' | awk -F= '{print $2}' | sed -e 's/"//g' ) + local ipv6_method="ignore" + if [ "${redhat_major_version}" = "8" ] ; then + ipv6_method="disabled" + fi + echo "Generating '${dev_file}' ..." cat <<-EOF >"${dev_file}" @@ -123,7 +129,7 @@ create_networkconfig() { [ipv6] addr-gen-mode=eui64 - method=disabled + method=${ipv6_method} [proxy] -- 2.39.5