ksud: uninstall module at next boot. close #740

This commit is contained in:
weishu
2023-07-11 21:25:44 +08:00
parent fb87d0f0f5
commit b554c66b46
2 changed files with 60 additions and 16 deletions

View File

@@ -3,6 +3,7 @@ use log::{info, warn};
use std::path::PathBuf;
use std::{collections::HashMap, path::Path};
use crate::module::prune_modules;
use crate::{
assets, defs, mount, restorecon,
utils::{self, ensure_clean_dir, ensure_dir_exists},
@@ -148,6 +149,10 @@ pub fn on_post_data_fs() -> Result<()> {
return Ok(());
}
if let Err(e) = prune_modules() {
warn!("prune modules failed: {}", e);
}
// Then exec common post-fs-data scripts
if let Err(e) = crate::module::exec_common_scripts("post-fs-data.d", true) {
warn!("exec common post-fs-data scripts failed: {}", e);