arc: add offline check and move storagemap command

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium
2024-03-21 19:59:49 +01:00
parent e6b9336c60
commit c718f77dcd
2 changed files with 10 additions and 3 deletions

View File

@@ -1733,7 +1733,6 @@ function credits() {
TEXT+="\n\Z4>> Based on:\Zn"
TEXT+="\n Redpill: \ZbTTG / Pocopico\Zn"
TEXT+="\n ARPL/RR: \Zbfbelavenuto / wjz304\Zn"
TEXT+="\n NVMe Scripts: \Zb007revad\Zn"
TEXT+="\n NVMe System: \Zbjim3ma\Zn"
TEXT+="\n System: \ZbBuildroot 2023.08.x\Zn"
TEXT+="\n DSM: \ZbSynology Inc.\Zn"

View File

@@ -35,8 +35,15 @@ fi
# Get Loader Disk Bus
BUS=$(getBus "${LOADER_DISK}")
# Get Portmap for Loader
getmap
# Offline Mode check
OFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
if [ "${OFFLINE}" = "false" ]; then
if ping -c 1 "github.com" &> /dev/null; then
writeConfigKey "arc.offline" "false" "${USER_CONFIG_FILE}"
else
writeConfigKey "arc.offline" "true" "${USER_CONFIG_FILE}"
fi
fi
# Get DSM Data from Config
MODEL="$(readConfigKey "model" "${USER_CONFIG_FILE}")"
@@ -367,6 +374,7 @@ function arcsettings() {
--infobox "Network Config..." 3 30
getnet
# Select Portmap for Loader (nonDT)
getmap
if [[ "${DT}" = "false" && $(lspci -d ::106 | wc -l) -gt 0 ]]; then
dialog --backtitle "$(backtitle)" --colors --title "Storage Map" \
--infobox "Storage Map..." 3 30