Allow setting user name and password from config

Add FIRST_USER_NAME and FIRST_USER_PASS variables that can be set
in the config (or enviroment). Defaults to the standard pi and
raspberry.
This commit is contained in:
Sam Tygier
2018-12-09 22:52:03 +00:00
committed by XECDesign
parent d1b747747c
commit d07096ebb5
5 changed files with 20 additions and 10 deletions

View File

@@ -32,12 +32,12 @@ systemctl enable resize2fs_once
EOF
fi
on_chroot << \EOF
on_chroot <<EOF
for GRP in input spi i2c gpio; do
groupadd -f -r "$GRP"
groupadd -f -r "\$GRP"
done
for GRP in adm dialout cdrom audio users sudo video games plugdev input gpio spi i2c netdev; do
adduser pi $GRP
adduser $FIRST_USER_NAME \$GRP
done
EOF