Set default VM names in case there is no user input

This commit is contained in:
Daniel Lerps 2022-03-09 18:55:24 +01:00
parent f866da5de3
commit 025886f92b
No known key found for this signature in database
GPG Key ID: 3078CEFF10D1A625
1 changed files with 16 additions and 5 deletions

21
setup
View File

@ -50,6 +50,7 @@ TMPDIR=${SCRIPT_DIR}/tmp
ISODIR=/var/lib/vz/template/iso/
HACKPXVERSION="3.2.0"
OCVERSION="0.7.7"
DEFAULT_VM_PREFIX="HACK-"
if [ `lscpu | grep "Vendor ID" | grep -i amd | wc -l` -eq 1 ]; then OSX_PLATFORM="AMD"; else OSX_PLATFORM="INTEL"; fi
@ -206,6 +207,8 @@ do
echo "Enter VM Name: "
read VM_NAME
if [ -z $VM_NAME ]; then VM_NAME="${DEFAULT_VM_PREFIX}HIGHSIERRA"; fi;
echo " "
echo -n "Enter a disk size [INTEGER] [Default: 64 Gb]: "
read SIZEDISK
@ -366,7 +369,7 @@ do
fi
echo "Virtual machine created successfully."
echo "Virtual machine (${VM_NAME}) created successfully."
echo " "
echo "Access the Proxmox Web Panel to continue with the installation ..."
echo "https://`ip address show vmbr0 | grep -w "inet" | awk -F " " '{ print $2 }' | awk -F "/" '{ print $1 }'`:8006"
@ -395,6 +398,8 @@ do
echo "Enter VM Name: "
read VM_NAME
if [ -z $VM_NAME ]; then VM_NAME="${DEFAULT_VM_PREFIX}MOJAVE"; fi;
echo " "
echo -n "Enter a disk size [INTEGER] [Default: 64 Gb]: "
read SIZEDISK
@ -555,7 +560,7 @@ do
fi
echo "Virtual machine created successfully."
echo "Virtual machine (${VM_NAME}) created successfully."
echo " "
echo "Access the Proxmox Web Panel to continue with the installation ..."
echo "https://`ip address show vmbr0 | grep -w "inet" | awk -F " " '{ print $2 }' | awk -F "/" '{ print $1 }'`:8006"
@ -584,6 +589,8 @@ do
echo "Enter VM Name: "
read VM_NAME
if [ -z $VM_NAME ]; then VM_NAME="${DEFAULT_VM_PREFIX}CATALINA"; fi;
echo " "
echo -n "Enter a disk size [INTEGER] [Default: 64 Gb]: "
read SIZEDISK
@ -744,7 +751,7 @@ do
fi
echo "Virtual machine created successfully."
echo "Virtual machine (${VM_NAME}) created successfully."
echo " "
echo "Access the Proxmox Web Panel to continue with the installation ..."
echo "https://`ip address show vmbr0 | grep -w "inet" | awk -F " " '{ print $2 }' | awk -F "/" '{ print $1 }'`:8006"
@ -773,6 +780,8 @@ do
echo "Enter VM Name: "
read VM_NAME
if [ -z $VM_NAME ]; then VM_NAME="${DEFAULT_VM_PREFIX}BIG-SUR"; fi;
echo " "
echo -n "Enter a disk size [INTEGER] [Default: 64 Gb]: "
read SIZEDISK
@ -933,7 +942,7 @@ do
fi
echo "Virtual machine created successfully."
echo "Virtual machine (${VM_NAME}) created successfully."
echo " "
echo "Access the Proxmox Web Panel to continue with the installation ..."
echo "https://`ip address show vmbr0 | grep -w "inet" | awk -F " " '{ print $2 }' | awk -F "/" '{ print $1 }'`:8006"
@ -962,6 +971,8 @@ do
echo "Enter VM Name: "
read VM_NAME
if [ -z $VM_NAME ]; then VM_NAME="${DEFAULT_VM_PREFIX}MONTEREY"; fi;
echo " "
echo -n "Enter a disk size [INTEGER] [Default: 64 Gb]: "
read SIZEDISK
@ -1122,7 +1133,7 @@ do
fi
echo "Virtual machine created successfully."
echo "Virtual machine (${VM_NAME}) created successfully."
echo " "
echo "Access the Proxmox Web Panel to continue with the installation ..."
echo "https://`ip address show vmbr0 | grep -w "inet" | awk -F " " '{ print $2 }' | awk -F "/" '{ print $1 }'`:8006"