]> git.pld-linux.org Git - packages/efi-boot-update.git/commitdiff
Remove and re-add each boot variable
authorJacek Konieczny <jajcus@jajcus.net>
Thu, 24 Oct 2013 16:08:19 +0000 (18:08 +0200)
committerJacek Konieczny <jajcus@jajcus.net>
Thu, 24 Oct 2013 16:09:45 +0000 (18:09 +0200)
efibootmgr --bootnum does not work as advertised – it doesn't
modify boot variable.

efi-boot-update

index af62b688ddb91eae608b908484bac96335479b37..2e55aa9257eb71136b5dbbb6c0445b72173c58f6 100755 (executable)
@@ -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"
 }
 
This page took 0.051776 seconds and 4 git commands to generate.