master
Brie Bruns 4 years ago
parent 49156f336d
commit 1a2af5670e
  1. 2
      config
  2. 2
      network/network-config-dhcp-v1
  3. 10
      network/network-config-v1
  4. 5
      virt-install-cloud.sh

@ -23,3 +23,5 @@ FORMAT=raw
# convert image format : yes or no
CONVERT=yes
# Addresses to use by default for name servers
nameservers="8.8.8.8, 1.1.1.1"

@ -6,5 +6,3 @@ config:
name: eth0
subnets:
- type: dhcp
- type: nameserver
search: [%DOMAIN%]

@ -6,12 +6,12 @@ config:
name: eth0
subnets:
- type: static
address: %%IP_ADDRESS%%
netmask: %%NETMASK%%
address: %IP_ADDRESS%
netmask: %NETMASK%
routes:
- network: 0.0.0.0
netmask: 0.0.0.0
gateway: %%GATEWAY%%
gateway: %GATEWAY%
- type: nameserver
address: [%%NAME_SERVER%%]
search: [%%DOMAIN%%]
address: [%NAME_SERVER%]
search: [%DOMAIN%]

@ -134,6 +134,11 @@ elif [[ $virt_netinfo_type == "1" ]]; then
if [[ ${virt_netinfo_address} == "dhcp" ]]; then
sed -e "s/%DOMAIN%/${domain}/" ${WORKING_DIR}/network/network-config-dhcp-v1 > ${WORKING_DIR}/output/network-config
extra_iso_files=" -map $WORKING_DIR/output/network-config network-config"
else
sed -e "s/%DOMAIN%/${domain}/" -e "s/%IP_ADDRESS%/${virt_netinfo_address}/" -e "s/%NETMASK%/${virt_netinfo_netmask}/" \
-e "s/%GATEWAY%/${virt_netinfo_gateway}/" -e "s/%NAME_SERVER%/${nameservers}/" \
${WORKING_DIR}/network/network-config-v1 > ${WORKING_DIR}/output/network-config
extra_iso_files=" -map $WORKING_DIR/output/network-config network-config"
fi
elif [[ $virt_netinfo_type == "2" ]]; then
echo "Not implemented yet!"

Loading…
Cancel
Save