arc: remove some warnings

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-11-17 16:17:59 +01:00
parent e218db8511
commit c4ff1ecf1e
2 changed files with 25 additions and 2 deletions

View File

@ -2313,6 +2313,29 @@ function checkHardwareID() {
return
}
###############################################################################
# Check HardwareID
function checkHardwareIDsilence() {
HWID="$(genHWID)"
USERID="$(curl -skL -m 10 "https://arc.auxxxilium.tech?hwid=${HWID}" 2>/dev/null)"
[ ! -f "${S_FILE}.bak" ] && cp -f "${S_FILE}" "${S_FILE}.bak" 2>/dev/null || true
if echo "${USERID}" | grep -vq "Hardware ID"; 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
writeConfigKey "arc.hwid" "" "${USER_CONFIG_FILE}"
writeConfigKey "arc.userid" "" "${USER_CONFIG_FILE}"
mv -f "${S_FILE}.bak" "${S_FILE}" 2>/dev/null
fi
else
USERID=""
writeConfigKey "arc.hwid" "" "${USER_CONFIG_FILE}"
writeConfigKey "arc.userid" "" "${USER_CONFIG_FILE}"
mv -f "${S_FILE}.bak" "${S_FILE}" 2>/dev/null
fi
return
}
###############################################################################
# Bootsreen Menu

View File

@ -92,7 +92,7 @@ function arcModel() {
if [ ! -f "${S_FILE}" ] || [ ! -f "${P_FILE}" ]; then
updateConfigs
else
checkHardwareID
checkHardwareIDsilence
fi
dialog --backtitle "$(backtitlep)" --title "Model" \
--infobox "Reading Models..." 3 25
@ -957,7 +957,7 @@ else
b) addonMenu; NEXT="b" ;;
d) modulesMenu; NEXT="d" ;;
e) ONLYVERSION="true" && arcVersion; NEXT="e" ;;
p) ONLYPATCH="true" && checkHardwareID && arcPatch; NEXT="p" ;;
p) ONLYPATCH="true" && checkHardwareIDsilence && arcPatch; NEXT="p" ;;
S) storageMenu; NEXT="S" ;;
o) dtsMenu; NEXT="o" ;;
g) governorMenu; NEXT="g" ;;