@@ -858,7 +858,7 @@ function updateMenu() {
|
||||
--menu "Choose an Option" 0 0 0 \
|
||||
1 "Update Loader \Z1(no reflash)\Zn" \
|
||||
2 "Update Dependencies" \
|
||||
3 "Update Arc Patch" \
|
||||
3 "Update Configs and Arc Patch" \
|
||||
4 "Switch Arc Branch: \Z1${ARC_BRANCH}\Zn" \
|
||||
2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && break
|
||||
@@ -886,9 +886,10 @@ function updateMenu() {
|
||||
updateLoader "${TAG}"
|
||||
;;
|
||||
2)
|
||||
updateDependencies
|
||||
dependenciesUpdate
|
||||
;;
|
||||
3)
|
||||
updateConfigs
|
||||
checkHardwareID
|
||||
;;
|
||||
4)
|
||||
@@ -2257,7 +2258,7 @@ function genHardwareID() {
|
||||
HWID="$(genHWID)"
|
||||
while true; do
|
||||
if [ -n "${HWID}" ]; then
|
||||
USERID="$(curl -skL "https://arc.auxxxilium.tech?hwid=${HWID}" 2>/dev/null)"
|
||||
USERID="$(curl -skL -m 10 "https://arc.auxxxilium.tech?hwid=${HWID}" 2>/dev/null)"
|
||||
if echo "${USERID}" | grep -vq "Hardware ID"; then
|
||||
dialog --backtitle "$(backtitle)" --title "HardwareID" \
|
||||
--msgbox "HardwareID: ${HWID}\nYour HardwareID is registered to UserID: ${USERID}!" 6 70
|
||||
@@ -2287,15 +2288,16 @@ function genHardwareID() {
|
||||
# Check HardwareID
|
||||
function checkHardwareID() {
|
||||
HWID="$(genHWID)"
|
||||
USERID="$(curl -skL "https://arc.auxxxilium.tech?hwid=${HWID}" 2>/dev/null)"
|
||||
USERID="$(curl -skL -m 10 "https://arc.auxxxilium.tech?hwid=${HWID}" 2>/dev/null)"
|
||||
if echo "${USERID}" | grep -vq "Hardware ID"; then
|
||||
cp -f "${S_FILE}" "${S_FILE}.bak"
|
||||
if curl -skL "https://arc.auxxxilium.tech?hwid=${HWID}&userid=${USERID}" -o "${S_FILE}" 2>/dev/null; then
|
||||
if curl -skL -m 10 "https://arc.auxxxilium.tech?hwid=${HWID}&userid=${USERID}" -o "${S_FILE}" 2>/dev/null; then
|
||||
writeConfigKey "arc.hwid" "${HWID}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.userid" "${USERID}" "${USER_CONFIG_FILE}"
|
||||
else
|
||||
dialog --backtitle "$(backtitle)" --title "HardwareID" \
|
||||
--infobox "HardwareID: Your HardwareID couldn't be verified!" 4 50
|
||||
sleep 3
|
||||
USERID=""
|
||||
writeConfigKey "arc.hwid" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.userid" "" "${USER_CONFIG_FILE}"
|
||||
@@ -2303,11 +2305,11 @@ function checkHardwareID() {
|
||||
else
|
||||
dialog --backtitle "$(backtitle)" --title "HardwareID" \
|
||||
--infobox "HardwareID: Your HardwareID isn't registered!" 4 50
|
||||
sleep 3
|
||||
USERID=""
|
||||
writeConfigKey "arc.hwid" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.userid" "" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
sleep 3
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -671,19 +671,6 @@ function arcSummary() {
|
||||
# Building Loader
|
||||
function make() {
|
||||
STEP="build"
|
||||
ARCCONF="$(readConfigKey "${MODEL}.serial" "${S_FILE}" 2>/dev/null)"
|
||||
SN="$(readConfigKey "sn" "${USER_CONFIG_FILE}")"
|
||||
BOOTMODE="$(readConfigKey "arc.mode" "${USER_CONFIG_FILE}")"
|
||||
if [ "${BOOTMODE}" != "automated" ] && [ "${ARCOFFLINE}" != "true" ] && [[ "${ARCPATCH}" != "true" || -z "${ARCCONF}" ]]; then
|
||||
if ! curl -skL "https://arc.auxxxilium.tech/check.yml" -o "${TMP_PATH}/check.yml" 2>/dev/null; then
|
||||
SN=$(generateSerial "${MODEL}" "false")
|
||||
else
|
||||
if grep -q "${SN}" "${TMP_PATH}/check.yml"; then
|
||||
SN=$(generateSerial "${MODEL}" "false")
|
||||
fi
|
||||
fi
|
||||
writeConfigKey "sn" "${SN}" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
# Read Model Config
|
||||
MODEL="$(readConfigKey "model" "${USER_CONFIG_FILE}")"
|
||||
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
|
||||
|
||||
@@ -447,7 +447,7 @@ function dependenciesUpdate() {
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
FAILED="false"
|
||||
dialog --backtitle "$(backtitle)" --title "Update Dependencies" --aspect 18 \
|
||||
--infobox "Updating Dependencies..." 0 0
|
||||
--infobox "Updating Dependencies..." 3 40
|
||||
sleep 2
|
||||
updateAddons
|
||||
[ $? -ne 0 ] && FAILED="true"
|
||||
@@ -463,11 +463,11 @@ function dependenciesUpdate() {
|
||||
[ $? -ne 0 ] && FAILED="true"
|
||||
if [ "${FAILED}" == "true" ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Update Dependencies" --aspect 18 \
|
||||
--infobox "Update failed!\nTry again later." 0 0
|
||||
--infobox "Update failed! Try again later." 3 40
|
||||
sleep 3
|
||||
elif [ "${FAILED}" == "false" ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Update Dependencies" --aspect 18 \
|
||||
--infobox "Update successful!" 0 0
|
||||
--infobox "Update successful!" 3 40
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
sleep 3
|
||||
|
||||
Reference in New Issue
Block a user