mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-24 02:09:52 +07:00
arc/arc-functions: rewrite power menu
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
8f0cab1764
commit
c799f465a9
@ -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
|
||||
|
@ -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 \
|
||||
|
Loading…
Reference in New Issue
Block a user