🐞 fix:TSG-18861:查找onie启动项缺少参数-v ,导致查找boot number 为空
This commit is contained in:
@@ -23,7 +23,7 @@ set_onie_next_boot()
|
|||||||
# select ONIE as the next OS to boot. The "BootNext" variable
|
# select ONIE as the next OS to boot. The "BootNext" variable
|
||||||
# is only used once by the firmware, after which the permanent
|
# is only used once by the firmware, after which the permanent
|
||||||
# "BootOrder" variable is used.
|
# "BootOrder" variable is used.
|
||||||
local boot_num=$(efibootmgr | grep "ONIE:" | grep "HD" | awk '{ print $1 }')
|
local boot_num=$(efibootmgr -v| grep "ONIE:" | grep "HD" | awk '{ print $1 }')
|
||||||
boot_num=${boot_num#Boot}
|
boot_num=${boot_num#Boot}
|
||||||
# Remove trailing '*'
|
# Remove trailing '*'
|
||||||
boot_num=${boot_num%\*}
|
boot_num=${boot_num%\*}
|
||||||
|
|||||||
Reference in New Issue
Block a user