Made username, password, and hostname generic
This commit is contained in:
parent
21cf9e8e80
commit
dae7639adf
|
@ -6,10 +6,10 @@ install -m 744 files/policy-rc.d ${ROOTFS_DIR}/usr/sbin/policy-rc.d
|
||||||
install -v -m 644 files/fstab ${ROOTFS_DIR}/etc/fstab
|
install -v -m 644 files/fstab ${ROOTFS_DIR}/etc/fstab
|
||||||
|
|
||||||
on_chroot sh -e - <<EOF
|
on_chroot sh -e - <<EOF
|
||||||
if ! id -u pi >/dev/null 2>&1; then
|
if ! id -u ${USER_NAME} >/dev/null 2>&1; then
|
||||||
adduser --disabled-password --gecos "" pi
|
adduser --disabled-password --gecos "" ${USER_NAME}
|
||||||
fi
|
fi
|
||||||
echo "pi:raspberry" | chpasswd
|
echo "${USER_NAME}:${PASS_WORD}" | chpasswd
|
||||||
echo "root:root" | chpasswd
|
echo "root:root" | chpasswd
|
||||||
EOF
|
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
|
|
|
@ -2,8 +2,17 @@
|
||||||
|
|
||||||
install -m 644 files/ipv6.conf ${ROOTFS_DIR}/etc/modprobe.d/ipv6.conf
|
install -m 644 files/ipv6.conf ${ROOTFS_DIR}/etc/modprobe.d/ipv6.conf
|
||||||
install -m 644 files/interfaces ${ROOTFS_DIR}/etc/network/interfaces
|
install -m 644 files/interfaces ${ROOTFS_DIR}/etc/network/interfaces
|
||||||
install -m 644 files/hostname ${ROOTFS_DIR}/etc/hostname
|
|
||||||
|
|
||||||
on_chroot sh -e - << EOF
|
cat <<EOF > ${ROOTFS_DIR}/etc/hostname
|
||||||
|
${HOST_NAME}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Append hostname
|
||||||
|
cat <<EOF >> ${ROOTFS_DIR}/etc/hosts
|
||||||
|
|
||||||
|
127.0.1.1 ${HOST_NAME}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
on_chroot sh -e - <<EOF
|
||||||
dpkg-divert --add --local /lib/udev/rules.d/75-persistent-net-generator.rules
|
dpkg-divert --add --local /lib/udev/rules.d/75-persistent-net-generator.rules
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
raspberrypi
|
|
|
@ -26,13 +26,13 @@ systemctl enable apply_noobs_os_config
|
||||||
systemctl enable resize2fs_once
|
systemctl enable resize2fs_once
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
on_chroot sh -e - << \EOF
|
on_chroot sh -e - <<\EOF
|
||||||
for GRP in input spi i2c gpio; do
|
for GRP in input spi i2c gpio; do
|
||||||
groupadd -f -r $GRP
|
groupadd -f -r $GRP
|
||||||
done
|
done
|
||||||
for GRP in adm dialout cdrom audio users sudo video games plugdev input gpio spi i2c netdev; do
|
for GRP in adm dialout cdrom audio users sudo video games plugdev input gpio spi i2c netdev; do
|
||||||
adduser pi $GRP
|
adduser ${USER_NAME} $GRP
|
||||||
done
|
done
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
on_chroot sh -e - <<EOF
|
on_chroot sh -e - <<EOF
|
||||||
|
|
Loading…
Reference in New Issue
Block a user