File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ function select_storage() {
116116 local -a MENU
117117 local -A STORAGE_MAP
118118 local COL_WIDTH=0
119+
119120 while read -r TAG TYPE _ TOTAL USED FREE _; do
120121 [[ -n " $TAG " && -n " $TYPE " ]] || continue
121122 local DISPLAY=" ${TAG} (${TYPE} )"
@@ -134,20 +135,15 @@ function select_storage() {
134135
135136 if [ $(( ${# MENU[@]} / 3 )) -eq 1 ]; then
136137 STORAGE_RESULT=" ${STORAGE_MAP[${MENU[0]} ]}"
137-
138138 return 0
139139 fi
140140
141141 local WIDTH=$(( COL_WIDTH + 42 ))
142-
143142 while true ; do
144- local DISPLAY_SELECTED=$(
145- whiptail --backtitle " Proxmox VE Helper Scripts" \
146- --title " Storage Pools" \
147- --radiolist " Which storage pool for ${CONTENT_LABEL,,} ?\n(Spacebar to select)"
148-
149- 16 " $WIDTH " 6 " ${MENU[@]} " 3>&1 1>&2 2>&3
150- )
143+ local DISPLAY_SELECTED=$( whiptail --backtitle " Proxmox VE Helper Scripts" \
144+ --title " Storage Pools" \
145+ --radiolist " Which storage pool for ${CONTENT_LABEL,,} ?\n(Spacebar to select)" \
146+ 16 " $WIDTH " 6 " ${MENU[@]} " 3>&1 1>&2 2>&3 )
151147
152148 [[ $? -ne 0 ]] && return 3
153149
@@ -160,6 +156,7 @@ function select_storage() {
160156 return 0
161157 done
162158}
159+
163160# Test if required variables are set
164161[[ " ${CTID:- } " ]] || {
165162 msg_error " You need to set 'CTID' variable."
You can’t perform that action at this time.
0 commit comments