summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorIrina Gómez <irinagomez@us.es>2019-05-22 13:27:57 +0200
committerIrina Gómez <irinagomez@us.es>2019-05-22 13:27:57 +0200
commitff5e572cf33b27a5685dd643686b9987a4961714 (patch)
treeb60e1102403450d3e4395984af3018b073b45f56 /client
parent093ebcd4610be859c0c4e6ed702de2d4d112e51a (diff)
#802 #888 ogRefindInstall used wrong parameter when calling ogNvramGetOrder. ogNvramSetOrder use uppercase in hexadecimal number because efibootmgr need it.
Diffstat (limited to 'client')
-rwxr-xr-xclient/engine/Boot.lib2
-rw-r--r--client/engine/UEFI.lib4
2 files changed, 3 insertions, 3 deletions
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