no message
parent
bb27d1254e
commit
c70599ffb8
|
@ -7,4 +7,4 @@ config:
|
||||||
subnets:
|
subnets:
|
||||||
- type: dhcp
|
- type: dhcp
|
||||||
- type: nameserver
|
- type: nameserver
|
||||||
search: [%%DOMAIN%%]
|
search: [%DOMAIN%]
|
|
@ -131,7 +131,9 @@ if [[ ${virt_netinfo_type} == "eni" ]]; then
|
||||||
echo " gateway ${virt_netinfo_gateway}" >> ${WORKING_DIR}/output/meta-data
|
echo " gateway ${virt_netinfo_gateway}" >> ${WORKING_DIR}/output/meta-data
|
||||||
fi
|
fi
|
||||||
elif [[ $virt_netinfo_type == "1" ]]; then
|
elif [[ $virt_netinfo_type == "1" ]]; then
|
||||||
echo "Not implemented yet!"
|
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"
|
||||||
elif [[ $virt_netinfo_type == "2" ]]; then
|
elif [[ $virt_netinfo_type == "2" ]]; then
|
||||||
echo "Not implemented yet!"
|
echo "Not implemented yet!"
|
||||||
fi
|
fi
|
||||||
|
@ -156,12 +158,16 @@ fi
|
||||||
# write the two cloud-init files into an ISO
|
# write the two cloud-init files into an ISO
|
||||||
echo "Preparing ISO file required by cloud-init..."
|
echo "Preparing ISO file required by cloud-init..."
|
||||||
#genisoimage -input-charset utf8 -output configuration.iso -volid cidata -joliet -rock user-data meta-data
|
#genisoimage -input-charset utf8 -output configuration.iso -volid cidata -joliet -rock user-data meta-data
|
||||||
xorriso -in_charset utf8 -outdev configuration.iso -volid cidata -joliet on -rockridge on -map output/user-data user-data -map output/meta-data meta-data
|
xorriso -in_charset utf8 -outdev configuration.iso -volid cidata -joliet on -rockridge on -map output/user-data user-data -map output/meta-data meta-data ${extra_iso_files}
|
||||||
|
|
||||||
# keep a backup of the files for future reference
|
# keep a backup of the files for future reference
|
||||||
if [[ "${BACKUP_ISO_FILES}" == "yes" ]]; then
|
if [[ "${BACKUP_ISO_FILES}" == "yes" ]]; then
|
||||||
cp -f ${WORKING_DIR}/output/user-data ${WORKING_DIR}/backups/${hostname}.${domain}.user-data
|
cp -f ${WORKING_DIR}/output/user-data ${WORKING_DIR}/backups/${hostname}.${domain}.user-data
|
||||||
cp -f ${WORKING_DIR}/output/meta-data ${WORKING_DIR}/backups/${hostname}.${domain}.meta-data
|
cp -f ${WORKING_DIR}/output/meta-data ${WORKING_DIR}/backups/${hostname}.${domain}.meta-data
|
||||||
|
if [[ -f ${WORKING_DIR}/output/network-config ]]; then
|
||||||
|
cp -f ${WORKING_DIR}/output/network-config ${WORKING_DIR}/backups/${hostname}.${domain}.network-config
|
||||||
|
chmod 640 ${WORKING_DIR}/backups/${hostname}.${domain}.network-config
|
||||||
|
fi
|
||||||
chmod 640 ${WORKING_DIR}/backups/${hostname}.${domain}.user-data ${WORKING_DIR}/backups/${hostname}.${domain}.meta-data
|
chmod 640 ${WORKING_DIR}/backups/${hostname}.${domain}.user-data ${WORKING_DIR}/backups/${hostname}.${domain}.meta-data
|
||||||
fi
|
fi
|
||||||
# copy ISO into libvirt's directory
|
# copy ISO into libvirt's directory
|
||||||
|
|
Loading…
Reference in New Issue