]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Fixing network config
authorFrank Brehm <frank.brehm@pixelpark.com>
Fri, 27 Oct 2023 11:59:17 +0000 (13:59 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Fri, 27 Oct 2023 11:59:17 +0000 (13:59 +0200)
snippets/tpl.001.basics.sh
snippets/tpl.040.network.sh

index a22be45777c29b4a04c77afed1f38b4477a3415c..28cc183c68adef5fbd3f31cb705bfb3a97c02cb4 100644 (file)
@@ -118,6 +118,7 @@ echo "  \$base_hostname:        $base_hostname"
 echo "  \$system_name:          $system_name"
 echo "  \$gateway:              $gateway"
 echo "  \$management_interface: ${mgmt_interface}"
+echo "  \$DEVNAME_ETH0:         $DEVNAME_ETH0"
 echo "  \$mac_address_eth0:     $mac_address_eth0"
 echo "  \$ip_address_eth0:      $ip_address_eth0"
 echo "  \$IP_ADDRESS_ETH0:      $IP_ADDRESS_ETH0"
index 2f417572fc2576c46ac74f0eff00fa2f9b692dbc..e101b6c83ee4df90fc972e33119d87cf8edda1ba 100644 (file)
@@ -70,16 +70,16 @@ create_networkconfig() {
         mv -v "${ifcfg_file}" "${nm_old_dir}"
     done
 
-    local dev_basename="${mgmt_interface}.nmconnection"
+    local dev_basename="${DEVNAME_ETH0}.nmconnection"
     local dev_file="${tmp_nw_script_dir}/${dev_basename}"
     echo "Generating '${dev_file}' ..."
 
     cat <<-EOF >"${dev_file}"
        [connection]
-       id=${mgmt_interface}
+       id=${DEVNAME_ETH0}
        uuid=${if_uuid}
        type=ethernet
-       interface-name=${mgmt_interface}
+       interface-name=${DEVNAME_ETH0}
 
        [ethernet]