Skip to content

Commit

Permalink
Fix mount order (#1235)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr-TSNG authored Dec 30, 2023
1 parent d08f537 commit 76e7d7c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions userspace/ksud/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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 /")?;
Expand Down

0 comments on commit 76e7d7c

Please sign in to comment.