mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-02-19 21:08:28 +00:00
Move REMOUNT_ROOT
This commit is contained in:
parent
78df677a42
commit
4772868d6a
@ -234,9 +234,6 @@ static bool check_key_combo() {
|
||||
extern int disable_deny();
|
||||
|
||||
static void post_fs_data() {
|
||||
if (getenv("REMOUNT_ROOT"))
|
||||
xmount(nullptr, "/", nullptr, MS_REMOUNT | MS_RDONLY, nullptr);
|
||||
|
||||
if (!check_data())
|
||||
return;
|
||||
|
||||
|
@ -358,7 +358,7 @@ static void daemon_entry() {
|
||||
|
||||
restore_tmpcon();
|
||||
|
||||
// SAR cleanups
|
||||
// Cleanups
|
||||
auto mount_list = MAGISKTMP + "/" ROOTMNT;
|
||||
if (access(mount_list.data(), F_OK) == 0) {
|
||||
file_readline(true, mount_list.data(), [](string_view line) -> bool {
|
||||
@ -366,6 +366,10 @@ static void daemon_entry() {
|
||||
return true;
|
||||
});
|
||||
}
|
||||
if (getenv("REMOUNT_ROOT")) {
|
||||
xmount(nullptr, "/", nullptr, MS_REMOUNT | MS_RDONLY, nullptr);
|
||||
unsetenv("REMOUNT_ROOT");
|
||||
}
|
||||
rm_rf((MAGISKTMP + "/" ROOTOVL).data());
|
||||
|
||||
// Load config status
|
||||
|
Loading…
x
Reference in New Issue
Block a user