Skip to content

Commit 198479c

Browse files
committed
Update rootdir.rs
1 parent a849ce9 commit 198479c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

native/src/init/rootdir.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ on property:init.svc.zygote=stopped
4747
pub fn inject_custom_rc(mut rc_list: Vec<String>, fd: RawFd, tmp_dir: &Utf8CStr) {
4848
let mut file = unsafe { File::from_raw_fd(fd) };
4949
rc_list.iter().for_each(|rc| {
50+
// Replace template arguments of rc scripts with dynamic paths
5051
let rc = rc.replace("${MAGISKTMP}", tmp_dir.as_str());
5152
write!(file, "\n{}\n", rc).ok();
5253
});
@@ -76,6 +77,7 @@ impl MagiskInit {
7677
.join(overlay)
7778
.join("init.rc");
7879
if init_rc.exists() {
80+
// Do not allow overwrite init.rc
7981
init_rc.remove().log_ok();
8082
}
8183
loop {

0 commit comments

Comments
 (0)