ksud: respect the skip_mount flag of module
This commit is contained in:
@@ -24,6 +24,7 @@ pub const MODULE_UPDATE_TMP_DIR: &str = concatcp!(ADB_DIR, "modules_update/");
|
|||||||
pub const DISABLE_FILE_NAME: &str = "disable";
|
pub const DISABLE_FILE_NAME: &str = "disable";
|
||||||
pub const UPDATE_FILE_NAME: &str = "update";
|
pub const UPDATE_FILE_NAME: &str = "update";
|
||||||
pub const REMOVE_FILE_NAME: &str = "remove";
|
pub const REMOVE_FILE_NAME: &str = "remove";
|
||||||
|
pub const SKIP_MOUNT_FILE_NAME: &str = "skip_mount";
|
||||||
|
|
||||||
pub const VERSION_CODE: &str = include_str!(concat!(env!("OUT_DIR"), "/VERSION_CODE"));
|
pub const VERSION_CODE: &str = include_str!(concat!(env!("OUT_DIR"), "/VERSION_CODE"));
|
||||||
pub const VERSION_NAME: &str = include_str!(concat!(env!("OUT_DIR"), "/VERSION_NAME"));
|
pub const VERSION_NAME: &str = include_str!(concat!(env!("OUT_DIR"), "/VERSION_NAME"));
|
||||||
|
|||||||
@@ -50,6 +50,11 @@ pub fn mount_systemlessly(module_dir: &str) -> Result<()> {
|
|||||||
info!("module: {} is disabled, ignore!", module.display());
|
info!("module: {} is disabled, ignore!", module.display());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
let skip_mount = module.join(defs::SKIP_MOUNT_FILE_NAME).exists();
|
||||||
|
if skip_mount {
|
||||||
|
info!("module: {} skip_mount exist, skip!", module.display());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
let module_system = Path::new(&module).join("system");
|
let module_system = Path::new(&module).join("system");
|
||||||
if module_system.is_dir() {
|
if module_system.is_dir() {
|
||||||
|
|||||||
Reference in New Issue
Block a user