From 60cb8274a09e6af9042264f9ebe8bad389b2c678 Mon Sep 17 00:00:00 2001 From: nospoonuser Date: Tue, 22 May 2018 21:39:33 +0200 Subject: [PATCH] added autologin --- scripts/bootstrap.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index c0bc627..0cb25cc 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -36,12 +36,29 @@ if [ -n "${PACKAGES}" ]; then chroot $CHROOT apt-get -y install ${PACKAGES} fi + +if [ "${LIVE_AUTOLOGIN}" == "true" ]; then +requiredir "$CHROOT/etc/systemd/system/getty@tty1.service.d/" +cat > "$CHROOT/etc/systemd/system/getty@tty1.service.d/override.conf" << EOF +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear %I \$TERM +EOF + +fi + #set the rootpw chpasswd -R $(readlink -f $CHROOT) <<< "root:${LIVE_ROOTPW}" #change to a full busybox - for tftp support sed -i -r 's/=.+(\/bin\/busybox)/=\1/' chroot/usr/share/initramfs-tools/hooks/zz-busybox-initramfs +#remove ubuntu ads +for f in 00-header 10-help-text 50-motd-news +do + [ -f ${CHROOT}/etc/update-motd.d/$f ] && rm ${CHROOT}/etc/update-motd.d/$f +done + #install kernel chroot $CHROOT apt -y -o "APT::Install-Recommends=false" install ${KERNEL_PACKAGE}