Generate an entry in /etc/passwd

This commit is contained in:
Alexander Sosedkin 2019-03-07 18:20:47 +07:00
parent 73cef94a51
commit 49e6351a87

6
script
View file

@ -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 \