refs 1606 mmounts efivars and changes awk to obtain correctly the windows entry in nvram

engine-branch
Luis Gerardo Romero Garcia 2025-02-24 09:49:06 +01:00
parent 6442fd9fa5
commit a593ab1498
2 changed files with 3 additions and 1 deletions

View File

@ -558,7 +558,7 @@ ogIsEfiActive || ogRaiseError $OG_ERR_NOTUEFI || return $?
if [[ $1 =~ ^([0-9a-fA-F]+)$ ]]; then
NUMENTRY=$( efibootmgr |awk -v NUM="$(printf %04x 0x$1|tr '[:lower:]' '[:upper:]')" '{ if($1~NUM) print substr($1,5,4)}')
else
NUMENTRY=$(efibootmgr |awk -v LABEL="$1" '{ if(substr($0, index($0,$2))==LABEL) print substr($1,5,4)}')
NUMENTRY=$(efibootmgr | awk -v LABEL="$1" '$0 ~ LABEL { print substr($1,5,4) }')
fi
[ "$NUMENTRY" == "" ] && return $(ogRaiseError $OG_ERR_NOTFOUND "NVRAM entry '$1'")

View File

@ -7,6 +7,8 @@
#@date 2012-01-12
#*/
# Montar efivar filesystem
isEfiActive && mount -t efivarfs none /sys/firmware/efi/efivars
# Lanzar servicios complementarios del cliente.
echo "${MSG_OTHERSERVICES:-.}"