代码拉取完成,页面将自动刷新
From a89380cdc9fc804fe3b2389a4e399111a5cf51da Mon Sep 17 00:00:00 2001
From: leeffo <[email protected]>
Date: Thu, 25 Aug 2022 16:04:02 +0800
Subject: [PATCH] modify grub.cfg path
---
grub2/50_ubackup | 4 ++--
grub2/ubackuplib.sh | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/grub2/50_ubackup b/grub2/50_ubackup
index 73a940c..8207eee 100644
--- a/grub2/50_ubackup
+++ b/grub2/50_ubackup
@@ -530,8 +530,8 @@ while [ "x$list" != "x" ] ; do
"${GRUB_CMDLINE_LINUX} BACKUPID=$id ${GRUB_CMDLINE_LINUX_DEFAULT}"
done
if [ -d /etc/ubackup ] ;then
- if [ -d /sys/firmware/efi/ -a -f /boot/efi/EFI/UnionTech/grub.cfg ] ;then
- cat /boot/efi/EFI/UnionTech/grub.cfg |grep -B 2000 '### END /etc/grub.d/01_users ###' > /etc/ubackup/grub2/grub2_only_one.cfg
+ if [ -d /sys/firmware/efi/ -a -f /boot/efi/EFI/openEuler/grub.cfg ] ;then
+ cat /boot/efi/EFI/openEuler/grub.cfg |grep -B 2000 '### END /etc/grub.d/01_users ###' > /etc/ubackup/grub2/grub2_only_one.cfg
fi
if [ -f /boot/grub2/grub.cfg ] ;then
diff --git a/grub2/ubackuplib.sh b/grub2/ubackuplib.sh
index e102352..b0af7d6 100644
--- a/grub2/ubackuplib.sh
+++ b/grub2/ubackuplib.sh
@@ -112,8 +112,8 @@ function umount_point() {
function update_grub2_menu() {
if [ -d /sys/firmware/efi/ ] ; then
- grub2-mkconfig > /boot/efi/EFI/UnionTech/grub.cfg
- cp -f /boot/efi/EFI/UnionTech/grub.cfg /etc/ubackup/grub2/org.cfg
+ grub2-mkconfig > /boot/efi/EFI/openEuler/grub.cfg
+ cp -f /boot/efi/EFI/openEuler/grub.cfg /etc/ubackup/grub2/org.cfg
else
grub2-mkconfig > /boot/grub2/grub.cfg
cp -f /boot/grub2/grub.cfg /etc/ubackup/grub2/org.cfg
@@ -131,7 +131,7 @@ function update_change_grub2_entry() {
fi
sed -i "s/BACKUPID=.*$/BACKUPID=$backupid/g" /etc/ubackup/grub2/grub2_only_one.cfg
if [ -d /sys/firmware/efi/ ] ; then
- cp -f /etc/ubackup/grub2/grub2_only_one.cfg /boot/efi/EFI/UnionTech/grub.cfg
+ cp -f /etc/ubackup/grub2/grub2_only_one.cfg /boot/efi/EFI/openEuler/grub.cfg
else
cp -f /etc/ubackup/grub2/grub2_only_one.cfg /boot/grub2/grub.cfg
fi
@@ -140,7 +140,7 @@ function update_change_grub2_entry() {
function grub2_menu_restore() {
if [ -d /sys/firmware/efi/ ] ; then
- cp -f /etc/ubackup/grub2/org.cfg /boot/efi/EFI/UnionTech/grub.cfg
+ cp -f /etc/ubackup/grub2/org.cfg /boot/efi/EFI/openEuler/grub.cfg
else
cp -f /etc/ubackup/grub2/org.cfg /boot/grub2/grub.cfg
fi
--
2.20.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。