From 6e3256633bffdde983602d86ed2a480d5781dc6b Mon Sep 17 00:00:00 2001 From: Nullptr Date: Fri, 29 Dec 2023 23:14:44 +0800 Subject: [PATCH] Fix mount order --- userspace/ksud/src/event.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/userspace/ksud/src/event.rs b/userspace/ksud/src/event.rs index cefdf3bf8cdb..29ad2115c6c5 100644 --- a/userspace/ksud/src/event.rs +++ b/userspace/ksud/src/event.rs @@ -178,6 +178,11 @@ pub fn on_post_data_fs() -> Result<()> { warn!("apply root profile sepolicy failed: {}", e); } + // mount temp dir + if let Err(e) = mount::mount_tmpfs(defs::TEMP_DIR) { + warn!("do temp dir mount failed: {}", e); + } + // exec modules post-fs-data scripts // TODO: Add timeout if let Err(e) = crate::module::exec_stage_script("post-fs-data", true) { @@ -194,11 +199,6 @@ pub fn on_post_data_fs() -> Result<()> { warn!("do systemless mount failed: {}", e); } - // mount temp dir - if let Err(e) = mount::mount_tmpfs(defs::TEMP_DIR) { - warn!("do temp dir mount failed: {}", e); - } - run_stage("post-mount", true); std::env::set_current_dir("/").with_context(|| "failed to chdir to /")?;