代码拉取完成,页面将自动刷新
同步操作将从 src-anolis-os/grub2 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Wed, 21 Nov 2018 15:37:32 +0100
Subject: [PATCH] Remove quotes when reading ID value from /etc/os-release
The field is used to obtain the path to the GRUB directory in the ESP for
UEFI installs. But in some OS the ID value is quoted, which leads to some
of the scripts to fail:
$ grub2-setpassword
/boot/efi/EFI/"redhat"/ does not exist.
Usage: /usr/sbin/grub2-setpassword [OPTION]
Related: rhbz#1650706
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
util/grub-set-password.in | 2 +-
util/grub-switch-to-blscfg.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/grub-set-password.in b/util/grub-set-password.in
index 5ebf50576..c0b5ebbfd 100644
--- a/util/grub-set-password.in
+++ b/util/grub-set-password.in
@@ -1,6 +1,6 @@
#!/bin/sh -e
-EFIDIR=$(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/')
+EFIDIR=$(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/' -e 's/\"//g')
if [ -d /sys/firmware/efi/efivars/ ]; then
grubdir=`echo "/@bootdirname@/efi/EFI/${EFIDIR}/" | sed 's,//*,/,g'`
else
diff --git a/util/grub-switch-to-blscfg.in b/util/grub-switch-to-blscfg.in
index 60cd6ca63..d353370cc 100644
--- a/util/grub-switch-to-blscfg.in
+++ b/util/grub-switch-to-blscfg.in
@@ -40,7 +40,7 @@ etcdefaultgrub=/etc/default/grub
eval "$("${grub_get_kernel_settings}")" || true
-EFIDIR=$(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/')
+EFIDIR=$(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/' -e 's/\"//g')
if [ -d /sys/firmware/efi/efivars/ ]; then
startlink=/etc/grub2-efi.cfg
grubdir=`echo "/@bootdirname@/efi/EFI/${EFIDIR}/" | sed 's,//*,/,g'`
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。