Merge pull request #5330 from AuxXxilium/dev

Dev
This commit is contained in:
AuxXxilium
2024-12-24 01:38:16 +01:00
committed by GitHub
3 changed files with 34 additions and 22 deletions

View File

@@ -2204,9 +2204,18 @@ function mountDSM() {
umount "${I}" 2>/dev/null
mount ${I} "/mnt/DSM/${NAME}" -o ro
done
MSG="Storage pools are mounted under /mnt/DSM.\nPlease check them via ${IPCON}:7304."
MSG="Storage pools are mounted under /mnt/DSM.\nPlease check them via ${IPCON}:7304.\nIf you proceed, DSM Pool will be unmounted!"
dialog --backtitle "$(backtitle)" --title "Mount DSM Pool" \
--msgbox "${MSG}" 7 50
if [ -n "${VOLS}" ]; then
dialog --backtitle "$(backtitle)" --title "Mount DSM Pool" \
--yesno "Unmount all storage pools?" 5 30
[ $? -ne 0 ] && return
for I in ${VOLS}; do
umount "${I}" 2>/dev/null
done
rm -rf /mnt/DSM
fi
return
}

View File

@@ -256,9 +256,7 @@ function arcVersion() {
writeConfigKey "smallnum" "" "${USER_CONFIG_FILE}"
writeConfigKey "zimage-hash" "" "${USER_CONFIG_FILE}"
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
writeConfigKey "arc.confdone" "false" "${USER_CONFIG_FILE}"
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")"
fi
dialog --backtitle "$(backtitlep)" --title "Version" \
--infobox "Reading DSM Build..." 3 25
@@ -311,10 +309,12 @@ function arcVersion() {
rm -f "${PART1_PATH}/grub_cksum.syno" "${PART1_PATH}/GRUB_VER" >/dev/null 2>&1 || true
rm -f "${USER_UP_PATH}/"*.tar >/dev/null 2>&1 || true
fi
MSG="Do you want to try Automated Mode?\nIf yes, Loader will configure, build and boot DSM."
dialog --backtitle "$(backtitlep)" --colors --title "Automated Mode" \
--yesno "${MSG}" 6 55
[ $? -eq 0 ] && ARCMODE="automated" || ARCMODE="config"
if [ "${ONLYVERSION}" != "true" ]; then
MSG="Do you want to try Automated Mode?\nIf yes, Loader will configure, build and boot DSM."
dialog --backtitle "$(backtitlep)" --colors --title "Automated Mode" \
--yesno "${MSG}" 6 55
[ $? -eq 0 ] && ARCMODE="automated" || ARCMODE="config"
fi
elif [ "${ARCMODE}" = "automated" ] || [ "${ARCRESTORE}" = "true" ]; then
VALID="true"
fi
@@ -411,29 +411,29 @@ function arcPatch() {
[ -n "${ARCCONF}" ] && writeConfigKey "arc.patch" "true" "${USER_CONFIG_FILE}" || writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
writeConfigKey "sn" "${SN}" "${USER_CONFIG_FILE}"
elif [ "${ARCMODE}" = "config" ]; then
dialog --clear --backtitle "$(backtitlep)" \
ARCCONF="$(readConfigKey "${MODEL}.serial" "${S_FILE}")"
if [ -n "${ARCCONF}" ]; then
dialog --clear --backtitle "$(backtitlep)" \
--nocancel --title "SN/Mac Options"\
--menu "Choose an Option" 7 60 0 \
1 "Use Arc Patch (AME, QC, Push Notify and more)" \
2 "Use random SN/Mac (Reduced DSM Features)" \
3 "Use my own SN/Mac (Be sure your Data is valid)" \
2>"${TMP_PATH}/resp"
2>"${TMP_PATH}/resp"
else
dialog --clear --backtitle "$(backtitlep)" \
--nocancel --title "SN/Mac Options"\
--menu "Choose an Option" 7 60 0 \
2 "Use random SN/Mac (Reduced DSM Features)" \
3 "Use my own SN/Mac (Be sure your Data is valid)" \
2>"${TMP_PATH}/resp"
fi
resp=$(cat ${TMP_PATH}/resp)
[ -z "${resp}" ] && return 1
if [ ${resp} -eq 1 ]; then
ARCCONF="$(readConfigKey "${MODEL}.serial" "${S_FILE}")"
if [ -n "${ARCCONF}" ]; then
SN="$(generateSerial "${MODEL}" "true")"
writeConfigKey "arc.patch" "true" "${USER_CONFIG_FILE}"
else
dialog --backtitle "$(backtitlep)" --colors --title "Arc Patch" \
--infobox "Arc Patch failed - Not registered HardwareID!" 3 50
sleep 3
SN="$(generateSerial "${MODEL}" "false")"
writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
fi
SN="$(generateSerial "${MODEL}" "true")"
writeConfigKey "arc.patch" "true" "${USER_CONFIG_FILE}"
elif [ ${resp} -eq 2 ]; then
# Generate random Serial
SN="$(generateSerial "${MODEL}" "false")"
writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
elif [ ${resp} -eq 3 ]; then
@@ -820,7 +820,7 @@ elif [ "${ARCMODE}" = "automated" ]; then
else
make
fi
else
elif [ "${ARCMODE}" = "config" ]; then
[ "${CONFDONE}" = "true" ] && NEXT="2" || NEXT="1"
[ "${BUILDDONE}" = "true" ] && NEXT="3" || NEXT="1"
while true; do
@@ -1099,6 +1099,8 @@ else
esac
done
clear
else
exec reboot
fi
# Inform user

View File

@@ -8,6 +8,7 @@ function availableAddons() {
fi
local ARCOFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
local ARCCONF="$(readConfigKey "${MODEL}.serial" "${S_FILE}")"
local PAT_URL="$(readConfigKey "paturl" "${USER_CONFIG_FILE}")"
for D in $(find "${ADDONS_PATH}" -maxdepth 1 -type d 2>/dev/null | sort); do
[ ! -f "${D}/manifest.yml" ] && continue
local ADDON=$(basename ${D})