diff options
author | Irina Gómez <irinagomez@us.es> | 2019-05-22 13:27:57 +0200 |
---|---|---|
committer | Irina Gómez <irinagomez@us.es> | 2019-05-22 13:27:57 +0200 |
commit | ff5e572cf33b27a5685dd643686b9987a4961714 (patch) | |
tree | b60e1102403450d3e4395984af3018b073b45f56 | |
parent | 093ebcd4610be859c0c4e6ed702de2d4d112e51a (diff) |
#802 #888 ogRefindInstall used wrong parameter when calling ogNvramGetOrder. ogNvramSetOrder use uppercase in hexadecimal number because efibootmgr need it.
-rwxr-xr-x | client/engine/Boot.lib | 2 | ||||
-rw-r--r-- | client/engine/UEFI.lib | 4 |
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 |