Browse Source

Fix typos with config backups

master
Brielle Bruns 11 months ago
parent
commit
c6195a1517
2 changed files with 4 additions and 4 deletions
  1. 0
    0
      backups/.gitkeep
  2. 4
    4
      virt-install-cloud.sh

+ 0
- 0
backups/.gitkeep View File


+ 4
- 4
virt-install-cloud.sh View File

@@ -158,10 +158,10 @@ echo "Preparing ISO file required by cloud-init..."
158 158
 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
159 159
 
160 160
 # keep a backup of the files for future reference
161
-if [[ "${BACKUP_ISO_FILE}" == "yes" ]]; then
162
-  cp user-data ${hostname}.user-data
163
-  cp meta-data ${hostname}.meta-data
164
-  chmod 640 ${hostname}.user-data ${hostname}.meta-data
161
+if [[ "${BACKUP_ISO_FILES}" == "yes" ]]; then
162
+  cp ${WORKING_DIR}/output/user-data ${WORKING_DIR}/backups/${hostname}.user-data
163
+  cp ${WORKING_DIR}/output/meta-data ${WORKING_DIR}/backups/${hostname}.meta-data
164
+  chmod 640 ${WORKING_DIR}/backups/${hostname}.user-data ${WORKING_DIR}/backups/${hostname}.meta-data
165 165
 fi
166 166
 # copy ISO into libvirt's directory
167 167
 cp configuration.iso ${POOL_PATH}/${hostname}.${domain}.configuration.iso

Loading…
Cancel
Save