]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Fixing snippets/tpl.040.network.sh
authorFrank Brehm <frank.brehm@pixelpark.com>
Thu, 2 Nov 2023 17:11:11 +0000 (18:11 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Thu, 2 Nov 2023 17:11:11 +0000 (18:11 +0100)
snippets/tpl.040.network.sh

index 69c0154670fa0632b5ee083e0e080cc91796cccc..82639a945d74e84366b45023f3dc24e6602a3f37 100644 (file)
@@ -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]