6 Star 0 Fork 1

src-openEuler/ubackup

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0002-modify-grub.cfg-path.patch 2.50 KB
一键复制 编辑 原始数据 按行查看 历史
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/ubackup.git
[email protected]:src-openeuler/ubackup.git
src-openeuler
ubackup
ubackup
master

搜索帮助