ksud: Fix confliction with stock system overlayfs

This commit is contained in:
tiann
2023-02-08 12:14:27 +08:00
parent 66284bfbe3
commit d26956ff72
4 changed files with 348 additions and 0 deletions

View File

@@ -137,11 +137,17 @@ pub fn on_post_data_fs() -> Result<()> {
return Ok(());
}
// umount all stock overlayfs and remount them after module mounted
let stock_overlay = mount::StockOverlay::new();
stock_overlay.umount_all();
// mount systemless overlay
if let Err(e) = mount_systemlessly(module_dir) {
warn!("do systemless mount failed: {}", e);
}
stock_overlay.mount_all();
// module mounted, exec modules post-fs-data scripts
// todo: Add timeout
if let Err(e) = crate::module::exec_common_scripts("post-fs-data.d", true) {