代码拉取完成,页面将自动刷新
同步操作将从 src-anolis-os/systemd 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 0c7f29561634f9374c0d9042304f4d4caa4242f0 Mon Sep 17 00:00:00 2001
From: Wen Yang <wenyang@linux.alibaba.com>
Date: Tue, 19 Apr 2022 13:50:04 +0800
Subject: [PATCH] mount-setup: change the system mount propagation to
---
src/core/main.c | 2 +-
src/core/mount-setup.c | 4 ++--
src/core/mount-setup.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/core/main.c b/src/core/main.c
index db91151..81dae1c 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -2519,7 +2519,7 @@ int main(int argc, char *argv[]) {
if (!skip_setup)
kmod_setup();
- r = mount_setup(loaded_policy);
+ r = mount_setup(loaded_policy, skip_setup);
if (r < 0) {
error_message = "Failed to mount API filesystems";
goto finish;
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
index a659458..9f9f953 100644
--- a/src/core/mount-setup.c
+++ b/src/core/mount-setup.c
@@ -400,7 +400,7 @@ static int relabel_cgroup_filesystems(void) {
}
#endif
-int mount_setup(bool loaded_policy) {
+int mount_setup(bool loaded_policy, bool leave_propagation) {
int r = 0;
r = mount_points_setup(ELEMENTSOF(mount_table), loaded_policy);
@@ -444,7 +444,7 @@ int mount_setup(bool loaded_policy) {
* needed. Note that we set this only when we are invoked directly by the kernel. If we are invoked by a
* container manager we assume the container manager knows what it is doing (for example, because it set up
* some directories with different propagation modes). */
- if (detect_container() <= 0)
+ if (detect_container() <= 0 && !leave_propagation)
if (mount(NULL, "/", NULL, MS_REC|MS_SHARED, NULL) < 0)
log_warning_errno(errno, "Failed to set up the root directory for shared mount propagation: %m");
diff --git a/src/core/mount-setup.h b/src/core/mount-setup.h
index 43cd890..7a011b2 100644
--- a/src/core/mount-setup.h
+++ b/src/core/mount-setup.h
@@ -4,7 +4,7 @@
#include <stdbool.h>
int mount_setup_early(void);
-int mount_setup(bool loaded_policy);
+int mount_setup(bool loaded_policy, bool leave_propagation);
int mount_cgroup_controllers(char ***join_controllers);
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。