Allow multiple entries for debian and match IPv4 more strictly
This commit is contained in:
parent
148a478121
commit
f95b220aa0
1 changed files with 4 additions and 4 deletions
|
|
@ -5,11 +5,11 @@
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
cur="$(efibootmgr | grep -Ei 'BootOrder:' | \
|
cur="$(efibootmgr | grep -Ei 'BootOrder:' | \
|
||||||
sed -E 's/^BootOrder: ([[:xdigit:]]{4}),.+$/\1/')"
|
sed -E 's/^BootOrder: ([[:xdigit:]]{4}),.+$/\1/')"
|
||||||
pxeip4="$(efibootmgr | grep -Ei "IP.*4" | \
|
pxeip4="$(efibootmgr | grep -Ei "IP.{0,5}4" | \
|
||||||
sed -E 's/^Boot([[:xdigit:]]{4}).+$/\1/')"
|
sed -E 's/^Boot([[:xdigit:]]{4}).+$/\1/' | paste -sd, -)"
|
||||||
debian="$(efibootmgr | grep -Ei "debian" | \
|
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
|
if [[ "$cur" != "$pxeip4" ]] && [[ -n "$pxeip4" ]] && [[ -n "$debian" ]] ; then
|
||||||
efibootmgr -o $pxeip4,$debian
|
efibootmgr -o $pxeip4,$debian
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue