mirror of
https://github.com/bin456789/reinstall.git
synced 2025-08-08 02:11:52 +00:00
core: 修复 efi 条目 inactive 时 (没有*符号) 报错
https://manpages.debian.org/unstable/efibootmgr/efibootmgr.8.en.html#Displaying_the_current_settings_(must_be_root):
This commit is contained in:
@@ -2588,6 +2588,7 @@ grep_efi_entry() {
|
||||
grep -E '^Boot[0-9a-fA-F]{4}'
|
||||
}
|
||||
|
||||
# trans.sh 有同名方法
|
||||
grep_efi_index() {
|
||||
awk '{print $1}' | sed -e 's/Boot//' -e 's/\*//'
|
||||
}
|
||||
|
3
trans.sh
3
trans.sh
@@ -822,8 +822,9 @@ del_invalid_efi_entry() {
|
||||
done < <(efibootmgr | grep 'HD(.*,GPT,')
|
||||
}
|
||||
|
||||
# reinstall.sh 有同名方法
|
||||
grep_efi_index() {
|
||||
awk -F '*' '{print $1}' | sed 's/Boot//'
|
||||
awk '{print $1}' | sed -e 's/Boot//' -e 's/\*//'
|
||||
}
|
||||
|
||||
# 某些机器可能不会回落到 bootx64.efi
|
||||
|
Reference in New Issue
Block a user