diff --git a/files/initrd/opt/arc/arc-functions.sh b/files/initrd/opt/arc/arc-functions.sh index 610ce4f7..bfcb82ed 100755 --- a/files/initrd/opt/arc/arc-functions.sh +++ b/files/initrd/opt/arc/arc-functions.sh @@ -2164,13 +2164,16 @@ function decryptMenu() { dialog --backtitle "$(backtitle)" --colors --title "Arc Decrypt" \ --msgbox "Decrypt successful: You can use Arc Patch." 0 0 mv -f "${S_FILE_ARC}" "${S_FILE}" + writeConfigKey "arc.key" "${ARC_KEY}" "${USER_CONFIG_FILE}" else dialog --backtitle "$(backtitle)" --colors --title "Arc Decrypt" \ --msgbox "Decrypt failed: Wrong Key for this Version." 0 0 + writeConfigKey "arc.key" "" "${USER_CONFIG_FILE}" fi else dialog --backtitle "$(backtitle)" --colors --title "Arc Decrypt" \ --msgbox "Decrypt failed: This will not work with the wrong Key." 0 0 + writeConfigKey "arc.key" "" "${USER_CONFIG_FILE}" fi fi return diff --git a/files/initrd/opt/arc/arc.sh b/files/initrd/opt/arc/arc.sh index d26bf7be..4b92776e 100755 --- a/files/initrd/opt/arc/arc.sh +++ b/files/initrd/opt/arc/arc.sh @@ -63,12 +63,14 @@ fi ARCIPV6="$(readConfigKey "arc.ipv6" "${USER_CONFIG_FILE}")" ARCPATCH="$(readConfigKey "arc.patch" "${USER_CONFIG_FILE}")" BOOTIPWAIT="$(readConfigKey "arc.bootipwait" "${USER_CONFIG_FILE}")" +CUSTOM="$(readConfigKey "arc.custom" "${USER_CONFIG_FILE}")" DIRECTBOOT="$(readConfigKey "arc.directboot" "${USER_CONFIG_FILE}")" EMMCBOOT="$(readConfigKey "arc.emmcboot" "${USER_CONFIG_FILE}")" HDDSORT="$(readConfigKey "arc.hddsort" "${USER_CONFIG_FILE}")" KERNEL="$(readConfigKey "arc.kernel" "${USER_CONFIG_FILE}")" KERNELLOAD="$(readConfigKey "arc.kernelload" "${USER_CONFIG_FILE}")" KERNELPANIC="$(readConfigKey "arc.kernelpanic" "${USER_CONFIG_FILE}")" +ARC_KEY="$(readConfigKey "arc.key" "${USER_CONFIG_FILE}")" MACSYS="$(readConfigKey "arc.macsys" "${USER_CONFIG_FILE}")" ODP="$(readConfigKey "arc.odp" "${USER_CONFIG_FILE}")" OFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")" @@ -79,7 +81,6 @@ SATACONTROLLER="$(readConfigKey "device.satacontroller" "${USER_CONFIG_FILE}")" SCSICONTROLLER="$(readConfigKey "device.sciscontroller" "${USER_CONFIG_FILE}")" RAIDCONTROLLER="$(readConfigKey "device.raidcontroller" "${USER_CONFIG_FILE}")" SASCONTROLLER="$(readConfigKey "device.sascontroller" "${USER_CONFIG_FILE}")" -CUSTOM="$(readConfigKey "arc.custom" "${USER_CONFIG_FILE}")" # Get Config/Build Status CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")" @@ -188,13 +189,25 @@ function arcModel() { [ -z "$(grep -w "${M}" "${S_FILE}")" ] && BETA="x" || BETA="" fi [ -z "$(grep -w "${A}" "${P_FILE}")" ] && COMPATIBLE=0 - [ ${COMPATIBLE} -eq 1 ] && echo -e "${M} \"\t$(printf "\Zb%-8s\Zn \Zb%-15s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "${CPU}" "${A}" "${DTS}" "${ARC}" "${IGPUS}" "${HBAS}" "${M_2_CACHE}" "${M_2_STORAGE}" "${USBS}" "${BETA}")\" ">>"${TMP_PATH}/menu" + if [ -n "${ARC_KEY}" ]; then + [ ${COMPATIBLE} -eq 1 ] && echo -e "${M} \"\t$(printf "\Zb%-8s\Zn \Zb%-15s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "${CPU}" "${A}" "${DTS}" "${ARC}" "${IGPUS}" "${HBAS}" "${M_2_CACHE}" "${M_2_STORAGE}" "${USBS}" "${BETA}")\" ">>"${TMP_PATH}/menu" + else + [ ${COMPATIBLE} -eq 1 ] && echo -e "${M} \"\t$(printf "\Zb%-8s\Zn \Zb%-15s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "${CPU}" "${A}" "${DTS}" "${IGPUS}" "${HBAS}" "${M_2_CACHE}" "${M_2_STORAGE}" "${USBS}" "${BETA}")\" ">>"${TMP_PATH}/menu" + fi done <<<$(cat "${TMP_PATH}/modellist") - dialog --backtitle "$(backtitle)" --title "DSM Model" --colors \ - --cancel-label "Show all" --help-button --help-label "Exit" \ - --extra-button --extra-label "Info" \ - --menu "Choose Model for Loader (x = supported / + = need Addons) | Beta Models can have faulty Values.\n$(printf "\Zb%-16s\Zn \Zb%-8s\Zn \Zb%-15s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "Model" "CPU" "Platform" "DT" "Arc" "iGPU" "HBA" "M.2 Cache" "M.2 Volume" "USB Mount" "Beta")" 0 120 0 \ - --file "${TMP_PATH}/menu" 2>"${TMP_PATH}/resp" + if [ -n "${ARC_KEY}" ]; then + dialog --backtitle "$(backtitle)" --title "DSM Model" --colors \ + --cancel-label "Show all" --help-button --help-label "Exit" \ + --extra-button --extra-label "Info" \ + --menu "Choose Model for Loader (x = supported / + = need Addons) | Beta Models can have faulty Values.\n$(printf "\Zb%-16s\Zn \Zb%-8s\Zn \Zb%-15s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "Model" "CPU" "Platform" "DT" "Arc" "iGPU" "HBA" "M.2 Cache" "M.2 Volume" "USB Mount" "Beta")" 0 120 0 \ + --file "${TMP_PATH}/menu" 2>"${TMP_PATH}/resp" + else + dialog --backtitle "$(backtitle)" --title "DSM Model" --colors \ + --cancel-label "Show all" --help-button --help-label "Exit" \ + --extra-button --extra-label "Info" \ + --menu "Choose Model for Loader (x = supported / + = need Addons) | Beta Models can have faulty Values.\n$(printf "\Zb%-16s\Zn \Zb%-8s\Zn \Zb%-15s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "Model" "CPU" "Platform" "DT" "iGPU" "HBA" "M.2 Cache" "M.2 Volume" "USB Mount" "Beta")" 0 120 0 \ + --file "${TMP_PATH}/menu" 2>"${TMP_PATH}/resp" + fi RET=$? case ${RET} in 0) # ok-button diff --git a/files/initrd/opt/arc/init.sh b/files/initrd/opt/arc/init.sh index 6868d234..62febba3 100755 --- a/files/initrd/opt/arc/init.sh +++ b/files/initrd/opt/arc/init.sh @@ -47,6 +47,7 @@ initConfigKey "arc.ipv6" "false" "${USER_CONFIG_FILE}" initConfigKey "arc.kernel" "official" "${USER_CONFIG_FILE}" initConfigKey "arc.kernelload" "power" "${USER_CONFIG_FILE}" initConfigKey "arc.kernelpanic" "5" "${USER_CONFIG_FILE}" +initConfigKey "arc.key" "" "${USER_CONFIG_FILE}" initConfigKey "arc.macsys" "hardware" "${USER_CONFIG_FILE}" initConfigKey "arc.odp" "false" "${USER_CONFIG_FILE}" initConfigKey "arc.offline" "false" "${USER_CONFIG_FILE}"