Allow modules to have custom uninstaller script

This commit is contained in:
topjohnwu
2019-03-23 03:50:55 -04:00
parent 8df942f96e
commit 8de03eef3f
3 changed files with 12 additions and 0 deletions

View File

@ -16,6 +16,14 @@ static void set_path() {
setenv("PATH", buf, 1);
}
void exec_script(const char *script) {
exec_t exec {
.pre_exec = set_path,
.fork = fork_no_zombie
};
exec_command_sync(exec, "/system/bin/sh", script);
}
void exec_common_script(const char *stage) {
char path[4096];
DIR *dir;