Add customization mecanism for keyboard layout, hostname, username:password and root password with the config file

This commit is contained in:
Jacen
2018-08-20 18:40:34 +02:00
parent 330ce73491
commit 0fee534ea0
11 changed files with 63 additions and 37 deletions
+4 -6
View File
@@ -5,11 +5,9 @@ install -m 644 files/noclear.conf "${ROOTFS_DIR}/etc/systemd/system/[email protected]
install -v -m 644 files/fstab "${ROOTFS_DIR}/etc/fstab"
on_chroot << EOF
if ! id -u pi >/dev/null 2>&1; then
adduser --disabled-password --gecos "" pi
if ! id -u ${RPI_USERNAME} >/dev/null 2>&1; then
adduser --disabled-password --gecos "" ${RPI_USERNAME}
fi
echo "pi:raspberry" | chpasswd
echo "root:root" | chpasswd
echo "${RPI_USERNAME}:${RPI_USERPASS}" | chpasswd
echo "root:${RPI_ROOTPASS}" | chpasswd
EOF