Commit 479194ea authored by Leo Le Bouter's avatar Leo Le Bouter

debian.package: BootOrder is modified automatically on new entry

parent d1d018e5
......@@ -5,10 +5,10 @@ ROOT_DEV=$(mount | grep -Po '^.+(?= on / )')
if ! efibootmgr --disk "$EFI_DEV" --verbose | grep "uefi-boot-metadata-collect-agent.efi"; then
efibootmgr --create --disk "$EFI_DEV" --label 'UEFI metadata-collect-agent' --loader /uefi-boot-metadata-collect-agent.efi
BOOT_CUR=$(efibootmgr | grep -Po '(?<=BootCurrent: ).+')
BOOT_AGENT=$(efibootmgr | grep -Po '(?<=Boot)\d+(?=.+UEFI metadata-collect-agent)')
NEW_BOOT_ORDER=$(efibootmgr | grep -Po '(?<=BootOrder: ).+' | sed "s/$BOOT_CUR/$BOOT_AGENT,$BOOT_CUR/")
efibootmgr -o "$NEW_BOOT_ORDER"
#BOOT_CUR=$(efibootmgr | grep -Po '(?<=BootCurrent: ).+')
#BOOT_AGENT=$(efibootmgr | grep -Po '(?<=Boot)\d+(?=.+UEFI metadata-collect-agent)')
#NEW_BOOT_ORDER=$(efibootmgr | grep -Po '(?<=BootOrder: ).+' | sed "s/$BOOT_CUR/$BOOT_AGENT,$BOOT_CUR/")
#efibootmgr -o "$NEW_BOOT_ORDER"
fi
e2label "$ROOT_DEV" "ROOT" || true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment