diff --git a/network/legacy-eni b/network/legacy-eni index 117ccaa..7787858 100644 --- a/network/legacy-eni +++ b/network/legacy-eni @@ -1,2 +1,2 @@ network-interfaces: | - allow-hotplug eth0 \ No newline at end of file + allow-hotplug eth0 diff --git a/virt-install-cloud.sh b/virt-install-cloud.sh index 1097283..0a9fd3e 100755 --- a/virt-install-cloud.sh +++ b/virt-install-cloud.sh @@ -123,9 +123,9 @@ sed -e "s/%FQDN%/${hostname}.${domain}/" ${WORKING_DIR}/user-data > ${WORKING_DI if [[ ${virt_netinfo_type} == "eni" ]]; then cat ${WORKING_DIR}/network/legacy-eni >> ${WORKING_DIR}/output/meta-data if [[ ${virt_netinfo_address} == "dhcp" ]]; then - echo " iface eth0 inet dhcp" >> ${WORKING_DIR}/output/meta-data + echo -e "\n iface eth0 inet dhcp" >> ${WORKING_DIR}/output/meta-data else - echo " iface eth0 inet static" >> ${WORKING_DIR}/output/meta-data + echo -e "\n iface eth0 inet static" >> ${WORKING_DIR}/output/meta-data echo " address ${virt_netinfo_address}" >> ${WORKING_DIR}/output/meta-data echo " netmask ${virt_netinfo_netmask}" >> ${WORKING_DIR}/output/meta-data echo " gateway ${virt_netinfo_gateway}" >> ${WORKING_DIR}/output/meta-data