Skip to content

Commit

Permalink
Merge pull request #7 from matttbe/home
Browse files Browse the repository at this point in the history
init: set the HOME env var if root
  • Loading branch information
arighi committed Mar 15, 2024
2 parents 450872b + 6d8e665 commit ea04e35
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.rs
Expand Up @@ -753,6 +753,8 @@ fn setup_root_home() {
utils::do_mkdir("/tmp/roothome");
utils::do_mount("/tmp/roothome", "/root", "", libc::MS_BIND as usize, "");
env::set_var("HOME", "/tmp/roothome");
} else {
env::set_var("HOME", "/root");
}
}

Expand Down

0 comments on commit ea04e35

Please sign in to comment.