mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-24 00:09:53 +07:00
arc-functions: rework StoragePanel Options
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
8f991cec67
commit
b3e5e16f5b
@ -631,16 +631,19 @@ function storagepanelMenu() {
|
||||
CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")"
|
||||
if [ "${CONFDONE}" == "true" ]; then
|
||||
while true; do
|
||||
STORAGEPANELUSER="$(readConfigKey "addons.storagepanel" "${USER_CONFIG_FILE}")"
|
||||
[ -n "${STORAGEPANELUSER}" ] && DISKPANELUSER="$(echo ${STORAGEPANELUSER} | cut -d' ' -f1)" || DISKPANELUSER="RACK_24_Bay"
|
||||
[ -n "${STORAGEPANELUSER}" ] && M2PANELUSER="$(echo ${STORAGEPANELUSER} | cut -d' ' -f2)" || M2PANELUSER="1X4"
|
||||
ITEMS="$(echo -e "RACK_2_Bay \nRACK_4_Bay \nRACK_8_Bay \nRACK_12_Bay \nRACK_16_Bay \nRACK_24_Bay \nRACK_60_Bay \nTOWER_1_Bay \nTOWER_2_Bay \nTOWER_4_Bay \nTOWER_6_Bay \nTOWER_8_Bay \nTOWER_12_Bay \n")"
|
||||
dialog --backtitle "$(backtitle)" --title "StoragePanel" \
|
||||
--default-item "RACK_24_Bay" --no-items --menu "Choose a Disk Panel" 0 0 0 ${ITEMS} \
|
||||
--default-item "${DISKPANELUSER}" --no-items --menu "Choose a Disk Panel" 0 0 0 ${ITEMS} \
|
||||
2>"${TMP_PATH}/resp"
|
||||
resp=$(cat ${TMP_PATH}/resp)
|
||||
[ -z "${resp}" ] && break
|
||||
STORAGE=${resp}
|
||||
ITEMS="$(echo -e "1X2 \n1X4 \n1X8 \n")"
|
||||
dialog --backtitle "$(backtitle)" --title "StoragePanel" \
|
||||
--default-item "1X8" --no-items --menu "Choose a M.2 Panel" 0 0 0 ${ITEMS} \
|
||||
--default-item "${M2PANELUSER}" --no-items --menu "Choose a M.2 Panel" 0 0 0 ${ITEMS} \
|
||||
2>"${TMP_PATH}/resp"
|
||||
resp=$(cat ${TMP_PATH}/resp)
|
||||
[ -z "${resp}" ] && break
|
||||
|
Loading…
Reference in New Issue
Block a user