arc/boot/init: remove bootwait counter

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-01-29 20:01:58 +01:00
parent de361bb52c
commit 9a23e1e376
3 changed files with 0 additions and 37 deletions

View File

@ -52,7 +52,6 @@ CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")"
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
ARCPATCH="$(readConfigKey "arc.patch" "${USER_CONFIG_FILE}")"
BOOTIPWAIT="$(readConfigKey "arc.bootipwait" "${USER_CONFIG_FILE}")"
BOOTWAIT="$(readConfigKey "arc.bootwait" "${USER_CONFIG_FILE}")"
REMAP="$(readConfigKey "arc.remap" "${USER_CONFIG_FILE}")"
KERNELLOAD="$(readConfigKey "arc.kernelload" "${USER_CONFIG_FILE}")"
KERNELPANIC="$(readConfigKey "arc.kernelpanic" "${USER_CONFIG_FILE}")"
@ -2664,19 +2663,6 @@ function bootipwaittime() {
writeConfigKey "arc.bootipwait" "${BOOTIPWAIT}" "${USER_CONFIG_FILE}"
}
###############################################################################
# modify bootwaittime
function bootwaittime() {
ITEMS="$(echo -e "0 \n5 \n10 \n20 \n30 \n60 \n")"
dialog --backtitle "$(backtitle)" --title "Boot Waittime" \
--default-item "${BOOTWAIT}" --no-items --menu "Choose Waittime(seconds)\nto init the Hardware" 0 0 0 ${ITEMS} \
2>"${TMP_PATH}/resp"
resp="$(cat ${TMP_PATH}/resp 2>/dev/null)"
[ -z "${resp}" ] && return 1
BOOTWAIT=${resp}
writeConfigKey "arc.bootwait" "${BOOTWAIT}" "${USER_CONFIG_FILE}"
}
###############################################################################
# allow user to save modifications to disk
function saveMenu() {
@ -2779,7 +2765,6 @@ function resetLoader() {
initConfigKey "arc.pathash" "" "${USER_CONFIG_FILE}"
initConfigKey "arc.paturl" "" "${USER_CONFIG_FILE}"
initConfigKey "arc.bootipwait" "20" "${USER_CONFIG_FILE}"
initConfigKey "arc.bootwait" "0" "${USER_CONFIG_FILE}"
initConfigKey "arc.kernelload" "power" "${USER_CONFIG_FILE}"
initConfigKey "arc.kernelpanic" "5" "${USER_CONFIG_FILE}"
initConfigKey "arc.kvmsupport" "false" "${USER_CONFIG_FILE}"
@ -2903,7 +2888,6 @@ while true; do
echo "m \"DSM Kernelload: \Z4${KERNELLOAD}\Zn \" " >>"${TMP_PATH}/menu"
if [ "${DIRECTBOOT}" = "false" ]; then
echo "i \"Boot IP Waittime: \Z4${BOOTIPWAIT}\Zn \" " >>"${TMP_PATH}/menu"
echo "B \"Boot Waittime: \Z4${BOOTWAIT}\Zn \" " >>"${TMP_PATH}/menu"
fi
echo "q \"Directboot: \Z4${DIRECTBOOT}\Zn \" " >>"${TMP_PATH}/menu"
if [ ${BOOTCOUNT} -gt 0 ]; then
@ -2999,7 +2983,6 @@ while true; do
NEXT="m"
;;
i) bootipwaittime; NEXT="i" ;;
B) bootwaittime; NEXT="B" ;;
q) [ "${DIRECTBOOT}" = "false" ] && DIRECTBOOT='true' || DIRECTBOOT='false'
grub-editenv "${GRUB_PATH}/grubenv" create
writeConfigKey "arc.directboot" "${DIRECTBOOT}" "${USER_CONFIG_FILE}"

View File

@ -212,25 +212,6 @@ elif [ "${DIRECTBOOT}" = "false" ]; then
done
ethtool -s ${N} wol g 2>/dev/null
done
BOOTWAIT="$(readConfigKey "arc.bootwait" "${USER_CONFIG_FILE}")"
[ -z "${BOOTWAIT}" ] && BOOTWAIT=0
w | awk '{print $1" "$2" "$4" "$5" "$6}' >WB
MSG=""
while test ${BOOTWAIT} -ge 0; do
MSG="$(printf "%2ds (Accessing Arc Overlay will interrupt Boot)" "${BOOTWAIT}")"
echo -en "\r${MSG}"
w | awk '{print $1" "$2" "$4" "$5" "$6}' >WC
if ! diff WB WC >/dev/null 2>&1; then
echo -en "\rA new access is connected, Boot is interrupted."
rm -f WB WC
exit 0
fi
sleep 1
BOOTWAIT=$((BOOTWAIT - 1))
done
rm -f WB WC
echo -en "\r$(printf "%$((${#MSG} * 3))s" " ")\n"
fi
echo -e "\033[1;37mLoading DSM kernel...\033[0m"
# Write new Bootcount

View File

@ -50,7 +50,6 @@ initConfigKey "arc.patch" "random" "${USER_CONFIG_FILE}"
initConfigKey "arc.pathash" "" "${USER_CONFIG_FILE}"
initConfigKey "arc.paturl" "" "${USER_CONFIG_FILE}"
initConfigKey "arc.bootipwait" "20" "${USER_CONFIG_FILE}"
initConfigKey "arc.bootwait" "0" "${USER_CONFIG_FILE}"
initConfigKey "arc.kernelload" "power" "${USER_CONFIG_FILE}"
initConfigKey "arc.kernelpanic" "5" "${USER_CONFIG_FILE}"
initConfigKey "arc.kvmsupport" "false" "${USER_CONFIG_FILE}"