代码拉取完成,页面将自动刷新
同步操作将从 src-anolis-os/systemd 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From db2816ee32fc81ba339175469e46b5dca7af8833 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <[email protected]>
Date: Sat, 22 Aug 2020 11:58:15 +0200
Subject: [PATCH] shared/install: fix preset operations for non-service
instantiated units
Fixes https://github.com/coreos/ignition/issues/1064.
(cherry picked from commit 47ab95fe4315b3f7ee5a3694460a744bb88c52fd)
Related: #1812972
---
src/shared/install.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/src/shared/install.c b/src/shared/install.c
index 263b239f10..c2847df3f8 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -2937,20 +2937,17 @@ static int pattern_match_multiple_instances(
/* Compose a list of specified instances when unit name is a template */
if (unit_name_is_valid(unit_name, UNIT_NAME_TEMPLATE)) {
- _cleanup_free_ char *prefix = NULL;
_cleanup_strv_free_ char **out_strv = NULL;
- char **iter;
-
- r = unit_name_to_prefix(unit_name, &prefix);
- if (r < 0)
- return r;
+ char **iter;
STRV_FOREACH(iter, rule.instances) {
_cleanup_free_ char *name = NULL;
- r = unit_name_build(prefix, *iter, ".service", &name);
+
+ r = unit_name_replace_instance(unit_name, *iter, &name);
if (r < 0)
return r;
- r = strv_extend(&out_strv, name);
+
+ r = strv_consume(&out_strv, TAKE_PTR(name));
if (r < 0)
return r;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。