Fix mount order (#1235)
This commit is contained in:
@@ -178,6 +178,11 @@ pub fn on_post_data_fs() -> Result<()> {
|
|||||||
warn!("apply root profile sepolicy failed: {}", e);
|
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
|
// exec modules post-fs-data scripts
|
||||||
// TODO: Add timeout
|
// TODO: Add timeout
|
||||||
if let Err(e) = crate::module::exec_stage_script("post-fs-data", true) {
|
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);
|
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);
|
run_stage("post-mount", true);
|
||||||
|
|
||||||
std::env::set_current_dir("/").with_context(|| "failed to chdir to /")?;
|
std::env::set_current_dir("/").with_context(|| "failed to chdir to /")?;
|
||||||
|
|||||||
Reference in New Issue
Block a user