summaryrefslogtreecommitdiff
path: root/stage2
diff options
context:
space:
mode:
authorSam Tygier <samtygier@yahoo.co.uk>2018-12-09 22:52:03 +0000
committerXECDesign <XECDesign@users.noreply.github.com>2018-12-21 04:09:47 +0000
commitd07096ebb565bc9ac97974895c57d88b0e82ce23 (patch)
tree98a718a8d82717f850136f44aa61f9492472562f /stage2
parentd1b747747c81d34c6779c2ac9bb86fcbfac79c6c (diff)
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.
Diffstat (limited to 'stage2')
-rwxr-xr-xstage2/01-sys-tweaks/01-run.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh
index 4e9c7d0..8fb99c1 100755
--- a/stage2/01-sys-tweaks/01-run.sh
+++ b/stage2/01-sys-tweaks/01-run.sh
@@ -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