ksud: Only start the monitor and load the module when KPM is enabled
Co-authored-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com> Co-authored-by: mihoy3rd <159522651+mihoy3rd@users.noreply.github.com>
This commit is contained in:
@@ -10,8 +10,6 @@ use std::path::Path;
|
||||
pub fn on_post_data_fs() -> Result<()> {
|
||||
ksucalls::report_post_fs_data();
|
||||
|
||||
kpm::start_kpm_watcher()?;
|
||||
|
||||
utils::umask(0);
|
||||
|
||||
#[cfg(unix)]
|
||||
@@ -105,10 +103,12 @@ pub fn on_post_data_fs() -> Result<()> {
|
||||
info!("no mount requested");
|
||||
}
|
||||
|
||||
run_stage("post-mount", true);
|
||||
if kpm::is_kpm_enabled()? {
|
||||
kpm::start_kpm_watcher()?;
|
||||
kpm::load_kpm_modules()?;
|
||||
}
|
||||
|
||||
// load kpm modules
|
||||
kpm::load_kpm_modules()?;
|
||||
run_stage("post-mount", true);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user