mirror of
https://github.com/tteck/Proxmox.git
synced 2024-12-01 09:50:29 +02:00
Update haos-vm-v4.sh
This commit is contained in:
parent
40897f22c5
commit
b21ce7b82e
@ -16,6 +16,7 @@ CL=`echo "\033[m"`
|
|||||||
BFR="\\r\\033[K"
|
BFR="\\r\\033[K"
|
||||||
HOLD="-"
|
HOLD="-"
|
||||||
CM="${GN}✓${CL}"
|
CM="${GN}✓${CL}"
|
||||||
|
CROSS="${RD}✗${CL}"
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o errtrace
|
set -o errtrace
|
||||||
set -o nounset
|
set -o nounset
|
||||||
@ -79,6 +80,11 @@ function msg_ok() {
|
|||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
||||||
}
|
}
|
||||||
|
function msg_error() {
|
||||||
|
local msg="$1"
|
||||||
|
echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
|
||||||
|
}
|
||||||
|
|
||||||
function default_settings() {
|
function default_settings() {
|
||||||
echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}"
|
echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}"
|
||||||
BRANCH=${STABLE}
|
BRANCH=${STABLE}
|
||||||
@ -210,8 +216,7 @@ STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" )
|
|||||||
done < <(pvesm status -content images | awk 'NR>1')
|
done < <(pvesm status -content images | awk 'NR>1')
|
||||||
VALID=$(pvesm status -content images | awk 'NR>1')
|
VALID=$(pvesm status -content images | awk 'NR>1')
|
||||||
if [ -z "$VALID" ]; then
|
if [ -z "$VALID" ]; then
|
||||||
echo -e "\n${RD}⚠ Unable to detect a valid storage location.${CL}"
|
msg_error "Unable to detect a valid storage location."
|
||||||
echo -e "Exiting..."
|
|
||||||
exit
|
exit
|
||||||
elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then
|
elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then
|
||||||
STORAGE=${STORAGE_MENU[0]}
|
STORAGE=${STORAGE_MENU[0]}
|
||||||
|
Loading…
Reference in New Issue
Block a user