Add customization mecanism for keyboard layout, hostname, username:password and root password with the config file
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
Index: jessie-stage1/rootfs/etc/hosts
|
||||
===================================================================
|
||||
--- jessie-stage1.orig/rootfs/etc/hosts
|
||||
+++ jessie-stage1/rootfs/etc/hosts
|
||||
@@ -3,3 +3,4 @@
|
||||
ff02::1 ip6-allnodes
|
||||
ff02::2 ip6-allrouters
|
||||
|
||||
+127.0.1.1 raspberrypi
|
||||
@@ -1 +0,0 @@
|
||||
01-hosts.diff
|
||||
@@ -4,3 +4,6 @@ install -m 644 files/ipv6.conf "${ROOTFS_DIR}/etc/modprobe.d/ipv6.conf"
|
||||
install -m 644 files/hostname "${ROOTFS_DIR}/etc/hostname"
|
||||
|
||||
ln -sf /dev/null "${ROOTFS_DIR}/etc/systemd/network/99-default.link"
|
||||
|
||||
echo "${RPI_LOCALHOST}" > "${ROOTFS_DIR}/etc/hostname"
|
||||
echo "127.0.1.1 ${RPI_LOCALHOST}" >> "${ROOTFS_DIR}/etc/hosts"
|
||||
|
||||
Reference in New Issue
Block a user