arc/arc-functions: rewrite power menu

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-07-04 21:58:23 +02:00
parent 8f0cab1764
commit c799f465a9
2 changed files with 4 additions and 4 deletions

View File

@ -1981,15 +1981,15 @@ function rebootMenu() {
echo -e "shell \"Exit to Shell Cmdline\"" >>"${TMP_PATH}/opts"
echo -e "init \"Restart Loader Init\"" >>"${TMP_PATH}/opts"
echo -e "network \"Restart Network Service\"" >>"${TMP_PATH}/opts"
dialog --backtitle "$(backtitle)" --title "Reboot" \
dialog --backtitle "$(backtitle)" --title "Power Menu" \
--menu "Choose a Destination" 0 0 0 --file "${TMP_PATH}/opts" \
2>${TMP_PATH}/resp
[ $? -ne 0 ] && return
resp=$(cat ${TMP_PATH}/resp)
[ -z "${resp}" ] && return
REDEST=${resp}
dialog --backtitle "$(backtitle)" --title "Reboot" \
--infobox "Reboot to ${REDEST}!" 0 0
dialog --backtitle "$(backtitle)" --title "Power Menu" \
--infobox "${REDEST} selected ...!" 0 0
if [ "${REDEST}" == "bios" ]; then
efibootmgr -n 0000 >/dev/null 2>&1
reboot

View File

@ -1000,7 +1000,7 @@ else
if [ "${OFFLINE}" == "false" ]; then
echo "z \"Update Loader \" " >>"${TMP_PATH}/menu"
fi
echo "I \"Restart/Shutdown \" " >>"${TMP_PATH}/menu"
echo "I \"Power Menu \" " >>"${TMP_PATH}/menu"
echo "V \"Credits \" " >>"${TMP_PATH}/menu"
dialog --clear --default-item ${NEXT} --backtitle "$(backtitle)" --colors \