Skip to content

Commit

Permalink
login: Do not dereference proot binds /bin and /etc
Browse files Browse the repository at this point in the history
`/bin` and `/etc` are symlinks to `/system/bin` and `/system/etc`, by
default proot will dereference and override them with new contents.

After this change, `/system/bin` and `/system/etc` are kept untouched,
so commands like `/system/bin/ping` can be run directly.
  • Loading branch information
azuwis authored and t184256 committed Jul 10, 2024
1 parent 9e51417 commit 0f84a10
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ Alexander Sosedkin <[email protected]>
Tobias Happ <[email protected]>
Bruno Bigras <[email protected]>
Evgeny Kurnevsky <[email protected]>
Zhong Jianxin <[email protected]>
4 changes: 2 additions & 2 deletions modules/environment/login/login.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ writeScript "login" ''
exec ${installationDir}/bin/proot-static \
-b ${installationDir}/nix:/nix \
-b ${installationDir}/bin:/bin \
-b ${installationDir}/etc:/etc \
-b ${installationDir}/bin:/bin! \
-b ${installationDir}/etc:/etc! \
-b ${installationDir}/tmp:/tmp \
-b ${installationDir}/usr:/usr \
-b ${installationDir}/dev/shm:/dev/shm \
Expand Down

0 comments on commit 0f84a10

Please sign in to comment.