mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-23 23:59:53 +07:00
tree: fix arc patch after update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
934b9e8fba
commit
7d9f7817af
@ -728,7 +728,7 @@ function backupMenu() {
|
||||
DT="$(readConfigKey "platforms.${PLATFORM}.dt" "${P_FILE}")"
|
||||
CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")"
|
||||
writeConfigKey "arc.key" "" "${USER_CONFIG_FILE}"
|
||||
ARC_KEY="$(readConfigKey "arc.key" "${USER_CONFIG_FILE}")"
|
||||
ARCKEY="$(readConfigKey "arc.key" "${USER_CONFIG_FILE}")"
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
break
|
||||
@ -947,7 +947,9 @@ function updateMenu() {
|
||||
fi
|
||||
updateConfigs "${TAG}"
|
||||
writeConfigKey "arc.key" "" "${USER_CONFIG_FILE}"
|
||||
ARC_KEY="$(readConfigKey "arc.key" "${USER_CONFIG_FILE}")"
|
||||
ARCKEY="$(readConfigKey "arc.key" "${USER_CONFIG_FILE}")"
|
||||
writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
|
||||
ARCPATCH="$(readConfigKey "arc.patch" "${USER_CONFIG_FILE}")"
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
;;
|
||||
@ -2093,12 +2095,12 @@ function decryptMenu() {
|
||||
dialog --backtitle "$(backtitle)" --colors --title "Arc Decrypt" \
|
||||
--inputbox "Enter Decryption Key for ${CONFIGSVERSION}\nKey is available in my Discord." 8 40 2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && return
|
||||
ARC_KEY=$(cat "${TMP_PATH}/resp")
|
||||
if openssl enc -in "${S_FILE_ENC}" -out "${S_FILE_ARC}" -d -aes-256-cbc -k "${ARC_KEY}" 2>/dev/null; then
|
||||
ARCKEY=$(cat "${TMP_PATH}/resp")
|
||||
if openssl enc -in "${S_FILE_ENC}" -out "${S_FILE_ARC}" -d -aes-256-cbc -k "${ARCKEY}" 2>/dev/null; then
|
||||
dialog --backtitle "$(backtitle)" --colors --title "Arc Decrypt" \
|
||||
--msgbox "Decrypt successful: You can use Arc Patch." 5 50
|
||||
cp -f "${S_FILE_ARC}" "${S_FILE}"
|
||||
writeConfigKey "arc.key" "${ARC_KEY}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.key" "${ARCKEY}" "${USER_CONFIG_FILE}"
|
||||
else
|
||||
cp -f "${S_FILE}.bak" "${S_FILE}"
|
||||
dialog --backtitle "$(backtitle)" --colors --title "Arc Decrypt" \
|
||||
@ -2110,7 +2112,7 @@ function decryptMenu() {
|
||||
CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")"
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
ARC_KEY="$(readConfigKey "arc.key" "${USER_CONFIG_FILE}")"
|
||||
ARCKEY="$(readConfigKey "arc.key" "${USER_CONFIG_FILE}")"
|
||||
else
|
||||
dialog --backtitle "$(backtitle)" --colors --title "Arc Decrypt" \
|
||||
--msgbox "Not available in offline Mode!" 5 50
|
||||
@ -2347,4 +2349,18 @@ function dtsMenu() {
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# reset Arc Patch
|
||||
function resetArcPatch() {
|
||||
writeConfigKey "arc.key" "" "${USER_CONFIG_FILE}"
|
||||
ARCKEY="$(readConfigKey "arc.key" "${USER_CONFIG_FILE}")"
|
||||
writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
|
||||
ARCPATCH="$(readConfigKey "arc.patch" "${USER_CONFIG_FILE}")"
|
||||
writeConfigKey "arc.confdone" "false" "${USER_CONFIG_FILE}"
|
||||
CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")"
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
return
|
||||
}
|
@ -34,7 +34,7 @@ if [ -n "${MODEL}" ]; then
|
||||
fi
|
||||
|
||||
# Get Arc Data from Config
|
||||
ARC_KEY="$(readConfigKey "arc.key" "${USER_CONFIG_FILE}")"
|
||||
ARCKEY="$(readConfigKey "arc.key" "${USER_CONFIG_FILE}")"
|
||||
ARCPATCH="$(readConfigKey "arc.patch" "${USER_CONFIG_FILE}")"
|
||||
ARCDYN="$(readConfigKey "arc.dynamic" "${USER_CONFIG_FILE}")"
|
||||
BOOTIPWAIT="$(readConfigKey "bootipwait" "${USER_CONFIG_FILE}")"
|
||||
@ -165,13 +165,13 @@ function arcModel() {
|
||||
fi
|
||||
[ -n "$(grep -w "${M}" "${S_FILE}")" ] && BETA="Arc" || BETA="Syno"
|
||||
[ -z "$(grep -w "${A}" "${P_FILE}")" ] && COMPATIBLE=0
|
||||
if [ -n "${ARC_KEY}" ]; then
|
||||
if [ -n "${ARCKEY}" ]; then
|
||||
[ ${COMPATIBLE} -eq 1 ] && echo -e "${M} \"\t$(printf "\Zb%-15s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-12s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "${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%-15s\Zn \Zb%-5s\Zn \Zb%-12s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "${A}" "${DTS}" "${IGPUS}" "${HBAS}" "${M_2_CACHE}" "${M_2_STORAGE}" "${USBS}" "${BETA}")\" ">>"${TMP_PATH}/menu"
|
||||
fi
|
||||
done < <(cat "${TMP_PATH}/modellist")
|
||||
if [ -n "${ARC_KEY}" ]; then
|
||||
if [ -n "${ARCKEY}" ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Arc DSM Model" --colors \
|
||||
--cancel-label "Show all" --help-button --help-label "Exit" \
|
||||
--extra-button --extra-label "Info" \
|
||||
@ -910,7 +910,7 @@ else
|
||||
[ "${BUILDDONE}" == "true" ] && NEXT="3" || NEXT="1"
|
||||
while true; do
|
||||
echo "= \"\Z4========== Main ==========\Zn \" " >"${TMP_PATH}/menu"
|
||||
if [ -z "${ARC_KEY}" ] && [ "${OFFLINE}" = "false" ]; then
|
||||
if [ -z "${ARCKEY}" ] && [ "${OFFLINE}" = "false" ]; then
|
||||
echo "0 \"Install Arc Patch Configs\" " >>"${TMP_PATH}/menu"
|
||||
fi
|
||||
echo "1 \"Choose Model \" " >>"${TMP_PATH}/menu"
|
||||
@ -951,6 +951,9 @@ else
|
||||
if readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "sequentialio"; then
|
||||
echo "Q \"SequentialIO Options \" " >>"${TMP_PATH}/menu"
|
||||
fi
|
||||
if [ -n "${ARCKEY}" ]; then
|
||||
echo "r \"Reset Arc Patch \" " >>"${TMP_PATH}/menu"
|
||||
fi
|
||||
fi
|
||||
if [ "${BOOTOPTS}" == "true" ]; then
|
||||
echo "6 \"\Z1Hide Boot Options\Zn \" " >>"${TMP_PATH}/menu"
|
||||
@ -1056,6 +1059,7 @@ else
|
||||
Q) sequentialIOMenu; NEXT="Q" ;;
|
||||
p) ONLYPATCH="true" && arcPatch; NEXT="p" ;;
|
||||
D) staticIPMenu; NEXT="D" ;;
|
||||
r) resetArcPatch; NEXT="r" ;;
|
||||
# Boot Section
|
||||
6) [ "${BOOTOPTS}" == "true" ] && BOOTOPTS='false' || BOOTOPTS='true'
|
||||
BOOTOPTS="${BOOTOPTS}"
|
||||
|
@ -644,8 +644,15 @@ function systemCheck () {
|
||||
else
|
||||
CPUFREQ="false"
|
||||
fi
|
||||
# Screen Timeout
|
||||
checkCmdline "arc_cmdline" "nomodeset" && SCREENOFF="false" || SCREENOFF="true"
|
||||
# Check for ARCKEY
|
||||
if openssl enc -in "${S_FILE_ENC}" -out "${S_FILE_ARC}" -d -aes-256-cbc -k "${ARCKEY}" 2>/dev/null; then
|
||||
cp -f "${S_FILE_ARC}" "${S_FILE}"
|
||||
writeConfigKey "arc.key" "${ARCKEY}" "${USER_CONFIG_FILE}"
|
||||
else
|
||||
cp -f "${S_FILE}" "${S_FILE}.bak"
|
||||
writeConfigKey "arc.key" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
@ -18,6 +18,7 @@ offlineCheck "false"
|
||||
ARCNIC="$(readConfigKey "arc.nic" "${USER_CONFIG_FILE}")"
|
||||
OFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
|
||||
AUTOMATED="$(readConfigKey "automated" "${USER_CONFIG_FILE}")"
|
||||
ARCKEY="$(readConfigKey "arc.key" "${USER_CONFIG_FILE}")"
|
||||
|
||||
# Get DSM Data from Config
|
||||
MODEL="$(readConfigKey "model" "${USER_CONFIG_FILE}")"
|
||||
@ -64,7 +65,7 @@ function arcUpdate() {
|
||||
# Automatic Update
|
||||
updateLoader
|
||||
updateAddons
|
||||
updateConfigs
|
||||
[ -z "${ARCKEY}" ] && updateConfigs
|
||||
updateLKMs
|
||||
updateModules
|
||||
updatePatches
|
||||
@ -72,7 +73,6 @@ function arcUpdate() {
|
||||
# Ask for Boot
|
||||
dialog --backtitle "$(backtitle)" --title "Update Loader" --aspect 18 \
|
||||
--infobox "Update successful!" 0 0
|
||||
writeConfigKey "arc.key" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
if [ "${CONFDONE}" == "true" ] && [ ! -f "${PART3_PATH}/automated" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user