From f8a261da392c92ade0dbf407ca09d8d194c60891 Mon Sep 17 00:00:00 2001 From: whiskerz007 <2713522+whiskerz007@users.noreply.github.com> Date: Fri, 20 Mar 2020 14:10:14 +0100 Subject: [PATCH] Add comments to improve code readability --- install.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/install.sh b/install.sh index bd23c8d..c0894f3 100644 --- a/install.sh +++ b/install.sh @@ -29,12 +29,15 @@ function cleanup() { TMP=`mktemp -d` pushd $TMP >/dev/null +# Select storage location STORAGE=${1:-local-lvm} pvesm list $STORAGE >& /dev/null || die "'$STORAGE' is not a valid storage ID." pvesm status -content images -storage $STORAGE >&/dev/null || die "'$STORAGE' does not allow 'Disk image' to be stored." STORAGE_TYPE=`pvesm status -storage $STORAGE | awk 'NR>1 {print $2}'` + +# Get the next guest VM/LXC ID VMID=$(cat<&/dev/null qm importdisk $VMID ${FILE%".gz"} $STORAGE ${IMPORT_OPT:-} 1>&/dev/null qm set $VMID -bootdisk sata0 -efidisk0 ${DISK0_REF},size=128K \ -sata0 ${DISK1_REF},size=6G > /dev/null + msg "\n\n\n ******************************** * Completed Successfully *