arc/network: cleanup

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium
2024-03-28 12:31:24 +01:00
parent 87aadb5f59
commit 5d5abfcdb6
2 changed files with 15 additions and 30 deletions

View File

@@ -13,6 +13,8 @@
[ -z "${LOADER_DISK}" ] && die "Loader Disk not found!"
alias DIALOG='dialog --backtitle "$(backtitle)" --colors'
# Memory: Check Memory installed
RAMFREE=$(($(free -m | grep -i mem | awk '{print$2}') / 1024 + 1))
RAMTOTAL=$((${RAMFREE} * 1024))

View File

@@ -34,36 +34,19 @@ function getnet() {
dialog --backtitle "$(backtitle)" --title "Mac Setting" --msgbox "Invalid MAC" 0 0
done
fi
if [ "${ARCPATCH}" = "true" ]; then
# Ask for Macsys
dialog --clear --backtitle "$(backtitle)" \
--nocancel --title "Macsys Setting" \
--menu "Choose an Option\n* Recommended Option" 10 50 0 \
1 "Hardware - Use Hardware Mac for DSM *" \
2 "Custom - Use Custom Mac for DSM" \
2>"${TMP_PATH}/resp"
resp="$(<"${TMP_PATH}/resp")"
[ -z "${resp}" ] && return 1
if [ ${resp} -eq 1 ]; then
writeConfigKey "arc.macsys" "hardware" "${USER_CONFIG_FILE}"
elif [ ${resp} -eq 2 ]; then
writeConfigKey "arc.macsys" "custom" "${USER_CONFIG_FILE}"
fi
else
# Ask for Macsys
dialog --clear --backtitle "$(backtitle)" \
--nocancel --title "Macsys Setting" \
--menu "Choose an Option\n* Recommended Option" 5 50 0 \
1 "Hardware - Use Hardware Mac for DSM *" \
2 "Custom - Use Custom Mac for DSM" \
2>"${TMP_PATH}/resp"
resp="$(<"${TMP_PATH}/resp")"
[ -z "${resp}" ] && return 1
if [ ${resp} -eq 1 ]; then
writeConfigKey "arc.macsys" "hardware" "${USER_CONFIG_FILE}"
elif [ ${resp} -eq 2 ]; then
writeConfigKey "arc.macsys" "custom" "${USER_CONFIG_FILE}"
fi
# Ask for Macsys
dialog --clear --backtitle "$(backtitle)" \
--nocancel --title "Macsys Setting" \
--menu "Choose an Option\n* Recommended Option" 5 50 0 \
1 "Hardware - Use Hardware Mac for DSM *" \
2 "Custom - Use Custom/Fake Mac for DSM" \
2>"${TMP_PATH}/resp"
resp="$(<"${TMP_PATH}/resp")"
[ -z "${resp}" ] && return 1
if [ ${resp} -eq 1 ]; then
writeConfigKey "arc.macsys" "hardware" "${USER_CONFIG_FILE}"
elif [ ${resp} -eq 2 ]; then
writeConfigKey "arc.macsys" "custom" "${USER_CONFIG_FILE}"
fi
MACSYS="$(readConfigKey "arc.macsys" "${USER_CONFIG_FILE}")"
}