From 1eac046bd9ae41b1976f6dde05072d761040c2ac Mon Sep 17 00:00:00 2001 From: root Date: Sun, 21 Jan 2024 04:01:03 +0200 Subject: [PATCH] 5 --- .gitignore | 2 ++ create-proxmox-cloudinit-images.sh | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b9e136a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +keys +flags/* diff --git a/create-proxmox-cloudinit-images.sh b/create-proxmox-cloudinit-images.sh index cdb7b4c..ef4cfe9 100755 --- a/create-proxmox-cloudinit-images.sh +++ b/create-proxmox-cloudinit-images.sh @@ -10,7 +10,8 @@ function createImage() { IMAGE_CORES="$6" IMAGE_STORE="$7" IMAGE_TYPE="$8" - + SSH_KEYS_FILE="keys" + stat "${IMAGE_FILE}" if [ "$?" -gt "0" ] then @@ -66,9 +67,9 @@ function createImage() { qm set ${IMAGE_ID} --vga std ;; esac - + qm set ${IMAGE_ID} --ipconfig0 ip=dhcp qm set ${IMAGE_ID} --agent enabled=1 - + qm set ${IMAGE_ID} --sshkeys ${SSH_KEYS_FILE} rm -vf "${IMAGE_FILE}" }