代码拉取完成,页面将自动刷新
同步操作将从 OpenCloudOS Stream/grub2 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From ac22931b0979fc0e68c7c7ebf348123975deb942 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Mon, 5 Jul 2021 18:24:22 +0200
Subject: [PATCH 259/272] grub-set-password: Always use /boot/grub2/user.cfg as
password default
The GRUB configuration file is always placed in /boot/grub2/ now, even for
EFI. But the tool is still creating the user.cfg in the ESP and not there.
Resolves: rhbz#1955294
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
util/grub-set-password.in | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/util/grub-set-password.in b/util/grub-set-password.in
index 889923e76..d8005e5a1 100644
--- a/util/grub-set-password.in
+++ b/util/grub-set-password.in
@@ -1,11 +1,6 @@
#!/bin/sh -e
-EFIDIR=$(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/\"//g')
-if [ -d /sys/firmware/efi/efivars/ ]; then
- grubdir=`echo "/@bootdirname@/efi/EFI/${EFIDIR}/" | sed 's,//*,/,g'`
-else
- grubdir=`echo "/@bootdirname@/@grubdirname@" | sed 's,//*,/,g'`
-fi
+grubdir=`echo "/@bootdirname@/@grubdirname@" | sed 's,//*,/,g'`
PACKAGE_VERSION="@PACKAGE_VERSION@"
PACKAGE_NAME="@PACKAGE_NAME@"
@@ -116,8 +111,6 @@ if [ -z "${MYPASS}" ]; then
exit 1
fi
-# on the ESP, these will fail to set the permissions, but it's okay because
-# the directory is protected.
install -m 0600 /dev/null "${OUTPUT_PATH}/user.cfg" 2>/dev/null || :
chmod 0600 "${OUTPUT_PATH}/user.cfg" 2>/dev/null || :
echo "GRUB2_PASSWORD=${MYPASS}" > "${OUTPUT_PATH}/user.cfg"
--
2.41.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。