mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 11:36:07 +01:00
Generate an entry in /etc/passwd
This commit is contained in:
parent
73cef94a51
commit
49e6351a87
1 changed files with 6 additions and 0 deletions
6
script
6
script
|
|
@ -92,6 +92,12 @@ cat > bootstrap/bin/login <<EOF
|
|||
set -e
|
||||
export USER=\$(/system/bin/whoami)
|
||||
export PROOT_TMP_DIR=$INST/tmp
|
||||
|
||||
if [ ! -e $INST/etc/passwd ]; then
|
||||
echo "Creating an entry in /etc/passwd..."
|
||||
echo "nix-on-droid:x:\$(/system/bin/stat -c '%u:%g'):nix-on-droid:/bin/sh" > $INST/etc/passwd
|
||||
fi
|
||||
|
||||
exec $INST/bin/proot \
|
||||
-b $INST/nix:/nix \
|
||||
-b $INST/bin:/bin \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue