From ff5e572cf33b27a5685dd643686b9987a4961714 Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Wed, 22 May 2019 13:27:57 +0200 Subject: #802 #888 ogRefindInstall used wrong parameter when calling ogNvramGetOrder. ogNvramSetOrder use uppercase in hexadecimal number because efibootmgr need it. --- client/engine/Boot.lib | 2 +- client/engine/UEFI.lib | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'client') diff --git a/client/engine/Boot.lib b/client/engine/Boot.lib index ef1fa01e..a3f69372 100755 --- a/client/engine/Boot.lib +++ b/client/engine/Boot.lib @@ -2721,7 +2721,7 @@ fi ogNvramAddEntry refind /EFI/refind/grubx64.efi # La ponemos en el segundo lugar del orden de arranque NUMENTRY=$(efibootmgr |awk '{ if ($2=="refind") print substr($1,5,4)}') -NEWORDER="$(ogNvramGetOrder|awk -v NEW="$NUNENTRY" '{ gsub(",", " "); printf "%x %x %s\n", $1 ,NEW, substr($0, index($0,$2)) }')" +NEWORDER="$(ogNvramGetOrder|awk -v NEW="$NUMENTRY" '{ gsub(",", " "); printf "%x %x %s\n", $1 ,NEW, substr($0, index($0,$2)) }')" ogNvramSetOrder $NEWORDER # Para la configuración del ogLive diff --git a/client/engine/UEFI.lib b/client/engine/UEFI.lib index 5bef80e6..d6a39bae 100644 --- a/client/engine/UEFI.lib +++ b/client/engine/UEFI.lib @@ -551,12 +551,12 @@ ogIsEfiActive || ogRaiseError $OG_ERR_NOTUEFI || return $? [[ "$@" =~ ^([0-9a-fA-F ]+)$ ]] || ogRaiseError $OG_ERR_FORMAT "$FUNCNAME Num_order1 [ Num_order2 ] ..." || return $? # Entradas de la NVRAM actuales -NUMENTRYS=$(efibootmgr|awk '{ if ($1~/Boot[0-9a-fA-F]+/) printf "0%s ", substr($1,5,4)}') +NUMENTRYS=$(efibootmgr|awk '{ if ($1~/Boot[0-9a-fA-F]{4}/) printf "0%s ", substr($1,5,4)}') ORDER="" for ARG in $@; do # Si no existe la entrada me salgo - ARG=$(printf %04x 0x$ARG) + ARG=$(printf %04X 0x$ARG) echo $NUMENTRYS | grep "$ARG" &>/dev/null || ogRaiseError $OG_ERR_NOTFOUND "NVRAM entry order \"$ARG\"" || return $? ORDER=${ORDER},$ARG done -- cgit v1.2.3-18-g5258