diff --git a/roles/lmn_misc/files/bootorder.sh b/roles/lmn_misc/files/bootorder.sh index a0fb6cd..e3ef2a9 100644 --- a/roles/lmn_misc/files/bootorder.sh +++ b/roles/lmn_misc/files/bootorder.sh @@ -5,11 +5,11 @@ set -eu cur="$(efibootmgr | grep -Ei 'BootOrder:' | \ - sed -E 's/^BootOrder: ([[:xdigit:]]{4}),.+$/\1/')" -pxeip4="$(efibootmgr | grep -Ei "IP.*4" | \ - sed -E 's/^Boot([[:xdigit:]]{4}).+$/\1/')" + sed -E 's/^BootOrder: ([[:xdigit:]]{4}),.+$/\1/')" +pxeip4="$(efibootmgr | grep -Ei "IP.{0,5}4" | \ + sed -E 's/^Boot([[:xdigit:]]{4}).+$/\1/' | paste -sd, -)" debian="$(efibootmgr | grep -Ei "debian" | \ - sed -E 's/^Boot([[:xdigit:]]{4}).+$/\1/')" + sed -E 's/^Boot([[:xdigit:]]{4}).+$/\1/' | paste -sd, -)" if [[ "$cur" != "$pxeip4" ]] && [[ -n "$pxeip4" ]] && [[ -n "$debian" ]] ; then efibootmgr -o $pxeip4,$debian