[packages/efi-boot-update] Remove and re-add each boot variable

jajcus jajcus at pld-linux.org
Thu Oct 24 21:38:30 CEST 2013


commit cd8795e20fd0dd28221a418b33a1ce12765533cc
Author: Jacek Konieczny <jajcus at jajcus.net>
Date:   Thu Oct 24 18:08:19 2013 +0200

    Remove and re-add each boot variable
    
    efibootmgr --bootnum does not work as advertised – it doesn't
    modify boot variable.

 efi-boot-update | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/efi-boot-update b/efi-boot-update
index af62b68..2e55aa9 100755
--- a/efi-boot-update
+++ b/efi-boot-update
@@ -143,13 +143,13 @@ add_bootmgr_entry () {
     binary="$(echo -nE "$binary"|sed -e's;/;\\;g')"
 
     if [ -n "$bootnum" ] ; then
-        verbose_cmd $EFIBOOTMGR $EFIBOOTMGR_OPTS --quiet \
-                            --bootnum "$bootnum" --loader "$binary" -u "$args"
-    else
-        verbose_cmd $EFIBOOTMGR $EFIBOOTMGR_OPTS --create \
-                            --quiet --label "$label" --loader "$binary" -u "$args"
-        bootnum="$(find_bootmgr_entry "$label")"
+       # efibootmgr doesn't seem to update the arguments
+       # we need to remove old entry and create a new one 
+       verbose_cmd $EFIBOOTMGR $EFIBOOTMGR_OPTS --quiet --delete-bootnum -b "$bootnum"
     fi
+    verbose_cmd $EFIBOOTMGR $EFIBOOTMGR_OPTS --create \
+                        --quiet --label "$label" --loader "$binary" -u "$args"
+    bootnum="$(find_bootmgr_entry "$label")"
     echo -n "$bootnum"
 }
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/efi-boot-update.git/commitdiff/34a0c5933dc61abd51c721da00d365322d02841e



More information about the pld-cvs-commit mailing list