1 Star 0 Fork 107

zhiqifeiyang/anaconda

forked from src-openEuler/anaconda 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Fix-the-systemd-generator-for-systemd-253-2165433.patch 1.75 KB
一键复制 编辑 原始数据 按行查看 历史
sun_hai 提交于 2023-08-30 20:27 . Fix the systemd generator for systemd 253
From 2cd57fee4d66ab8df06afe089da80a5e20168f25 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Wed, 1 Feb 2023 08:26:31 -0800
Subject: [PATCH] Fix the systemd generator for systemd 253 (#2165433)
As Zbyszek explained in
https://bugzilla.redhat.com/show_bug.cgi?id=2165433#c5 ,
generators aren't supposed to write outside the special locations
passed to them as args. Just writing the files into the first
of the provided locations seems to work fine (tested that this
fixes both text install and rescue mode).
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Conflict:https://github.com/rhinstaller/anaconda/commit/2cd57fee4d66ab8df06afe089da80a5e20168f25
Reference:https://github.com/rhinstaller/anaconda/commit/2cd57fee4d66ab8df06afe089da80a5e20168f25
---
data/systemd/anaconda-generator | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/data/systemd/anaconda-generator b/data/systemd/anaconda-generator
index 5791678609..c9a5230cae 100755
--- a/data/systemd/anaconda-generator
+++ b/data/systemd/anaconda-generator
@@ -11,8 +11,8 @@ fi
# set up dirs
systemd_dir=/lib/systemd/system
-target_dir=$systemd_dir/anaconda.target.wants
-mkdir -p $target_dir
+target_dir="$1/anaconda.target.wants"
+mkdir -p "$target_dir"
# create symlink anaconda.target.wants/SERVICE@TTY.service
service_on_tty() {
@@ -41,5 +41,5 @@ for tty in hvc0 hvc1 xvc0 hvsi0 hvsi1 hvsi2; do
fi
done
-ln -sf $systemd_dir/anaconda-nm-config.service $target_dir/anaconda-nm-config.service
-ln -sf $systemd_dir/anaconda-pre.service $target_dir/anaconda-pre.service
+ln -sf "$systemd_dir/anaconda-nm-config.service" "$target_dir/anaconda-nm-config.service"
+ln -sf "$systemd_dir/anaconda-pre.service" "$target_dir/anaconda-pre.service"
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhiqifeiyang/anaconda.git
git@gitee.com:zhiqifeiyang/anaconda.git
zhiqifeiyang
anaconda
anaconda
master

搜索帮助