login: Do not dereference proot binds /bin and /etc

`/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.
This commit is contained in:
Zhong Jianxin 2024-05-07 19:18:07 +08:00 committed by Alexander Sosedkin
parent 25f49c76c4
commit 8bcadcef69
2 changed files with 3 additions and 2 deletions

View file

@ -2,3 +2,4 @@ Alexander Sosedkin <monk@unboiled.info>
Tobias Happ <tobias.happ@gmx.de> Tobias Happ <tobias.happ@gmx.de>
Bruno Bigras <bigras.bruno@gmail.com> Bruno Bigras <bigras.bruno@gmail.com>
Evgeny Kurnevsky <kurnevsky@gmail.com> Evgeny Kurnevsky <kurnevsky@gmail.com>
Zhong Jianxin <azuwis@gmail.com>

View file

@ -48,8 +48,8 @@ writeScript "login" ''
exec ${installationDir}/bin/proot-static \ exec ${installationDir}/bin/proot-static \
-b ${installationDir}/nix:/nix \ -b ${installationDir}/nix:/nix \
-b ${installationDir}/bin:/bin \ -b ${installationDir}/bin:/bin! \
-b ${installationDir}/etc:/etc \ -b ${installationDir}/etc:/etc! \
-b ${installationDir}/tmp:/tmp \ -b ${installationDir}/tmp:/tmp \
-b ${installationDir}/usr:/usr \ -b ${installationDir}/usr:/usr \
-b ${installationDir}/dev/shm:/dev/shm \ -b ${installationDir}/dev/shm:/dev/shm \