From c6195a1517ecbbe1071457c364e437266ea7376d Mon Sep 17 00:00:00 2001 From: Brielle Bruns Date: Sun, 13 May 2018 20:12:46 -0600 Subject: [PATCH] Fix typos with config backups --- backups/.gitkeep | 0 virt-install-cloud.sh | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 backups/.gitkeep diff --git a/backups/.gitkeep b/backups/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/virt-install-cloud.sh b/virt-install-cloud.sh index 536a710..38512a6 100755 --- a/virt-install-cloud.sh +++ b/virt-install-cloud.sh @@ -158,10 +158,10 @@ echo "Preparing ISO file required by cloud-init..." 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 # keep a backup of the files for future reference -if [[ "${BACKUP_ISO_FILE}" == "yes" ]]; then - cp user-data ${hostname}.user-data - cp meta-data ${hostname}.meta-data - chmod 640 ${hostname}.user-data ${hostname}.meta-data +if [[ "${BACKUP_ISO_FILES}" == "yes" ]]; then + cp ${WORKING_DIR}/output/user-data ${WORKING_DIR}/backups/${hostname}.user-data + cp ${WORKING_DIR}/output/meta-data ${WORKING_DIR}/backups/${hostname}.meta-data + chmod 640 ${WORKING_DIR}/backups/${hostname}.user-data ${WORKING_DIR}/backups/${hostname}.meta-data fi # copy ISO into libvirt's directory cp configuration.iso ${POOL_PATH}/${hostname}.${domain}.configuration.iso