mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-02-21 12:38:31 +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();
|
extern int disable_deny();
|
||||||
|
|
||||||
static void post_fs_data() {
|
static void post_fs_data() {
|
||||||
if (getenv("REMOUNT_ROOT"))
|
|
||||||
xmount(nullptr, "/", nullptr, MS_REMOUNT | MS_RDONLY, nullptr);
|
|
||||||
|
|
||||||
if (!check_data())
|
if (!check_data())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -358,7 +358,7 @@ static void daemon_entry() {
|
|||||||
|
|
||||||
restore_tmpcon();
|
restore_tmpcon();
|
||||||
|
|
||||||
// SAR cleanups
|
// Cleanups
|
||||||
auto mount_list = MAGISKTMP + "/" ROOTMNT;
|
auto mount_list = MAGISKTMP + "/" ROOTMNT;
|
||||||
if (access(mount_list.data(), F_OK) == 0) {
|
if (access(mount_list.data(), F_OK) == 0) {
|
||||||
file_readline(true, mount_list.data(), [](string_view line) -> bool {
|
file_readline(true, mount_list.data(), [](string_view line) -> bool {
|
||||||
@ -366,6 +366,10 @@ static void daemon_entry() {
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (getenv("REMOUNT_ROOT")) {
|
||||||
|
xmount(nullptr, "/", nullptr, MS_REMOUNT | MS_RDONLY, nullptr);
|
||||||
|
unsetenv("REMOUNT_ROOT");
|
||||||
|
}
|
||||||
rm_rf((MAGISKTMP + "/" ROOTOVL).data());
|
rm_rf((MAGISKTMP + "/" ROOTOVL).data());
|
||||||
|
|
||||||
// Load config status
|
// Load config status
|
||||||
|
Loading…
x
Reference in New Issue
Block a user