ksud: skip removing module if no modules exist, also add uninstall mangaer, reboot

This commit is contained in:
weishu
2024-04-23 15:32:15 +08:00
parent 0697db618e
commit 3aac979caa
3 changed files with 25 additions and 10 deletions

View File

@@ -41,7 +41,7 @@ enum Commands {
Uninstall {
/// magiskboot path, if not specified, will search from $PATH
#[arg(long, default_value = None)]
magiskboot_path: Option<PathBuf>,
magiskboot: Option<PathBuf>,
},
/// SELinux policy Patch tool
@@ -308,7 +308,7 @@ pub fn run() -> Result<()> {
}
}
Commands::Install => utils::install(),
Commands::Uninstall { magiskboot_path } => utils::uninstall(magiskboot_path),
Commands::Uninstall { magiskboot } => utils::uninstall(magiskboot),
Commands::Sepolicy { command } => match command {
Sepolicy::Patch { sepolicy } => crate::sepolicy::live_patch(&sepolicy),
Sepolicy::Apply { file } => crate::sepolicy::apply_file(file),