fix rebootto

This commit is contained in:
Ing 2024-03-29 05:21:28 +08:00
parent 0688e9e475
commit e082a52784

View File

@ -332,7 +332,7 @@ function getLogo() {
function rebootTo() {
MODES="config recovery junior"
[ -z "${1}" ] && exit 1
if ! echo "${MODES}" | grep -q "${1}"; then exit 1; fi
if ! echo "${MODES}" | grep -qw "${1}"; then exit 1; fi
# echo "Rebooting to ${1} mode"
GRUBPATH="$(dirname $(find ${PART1_PATH}/ -name grub.cfg 2>/dev/null | head -1))"
ENVFILE="${GRUBPATH}/grubenv"