2020-09-03 03:20:38 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
2020-08-17 19:54:31 -04:00
|
|
|
|
|
|
|
mkdir -p "${ROOTFS_DIR}/usr/local/bin/"
|
2020-09-03 03:25:46 -04:00
|
|
|
install -m 755 files/tp-config "${ROOTFS_DIR}/usr/local/bin/tp-config"
|
|
|
|
install -m 755 files/octo-settings "${ROOTFS_DIR}/usr/local/bin/octo-settings"
|
2020-08-17 19:54:31 -04:00
|
|
|
install -m 755 files/first-time.sh "${ROOTFS_DIR}/etc/profile.d/first-time.sh"
|
2020-09-03 03:25:46 -04:00
|
|
|
install -m 755 files/tp-lib.sh "${ROOTFS_DIR}/usr/local/lib/tp-lib.sh"
|
2020-08-17 19:54:31 -04:00
|
|
|
|
|
|
|
# Autologin on first boot
|
|
|
|
mkdir -p ${ROOTFS_DIR}/etc/systemd/system/getty@tty1.service.d/
|
|
|
|
cat > ${ROOTFS_DIR}/etc/systemd/system/getty@tty1.service.d/override.conf << 'EOF'
|
|
|
|
[Service]
|
|
|
|
ExecStart=
|
2020-10-11 00:27:55 -04:00
|
|
|
ExecStart=-/usr/sbin/agetty --skip-login --nonewline --noissue --autologin root --noclear %I $TERM
|
2020-08-17 19:54:31 -04:00
|
|
|
EOF
|
|
|
|
|
|
|
|
on_chroot << EOF
|
2020-09-03 03:25:46 -04:00
|
|
|
# Install PyYAML
|
|
|
|
pip3 install pyyaml
|
|
|
|
# Don't boot to a GUI
|
2020-08-17 19:54:31 -04:00
|
|
|
systemctl set-default multi-user.target
|
|
|
|
EOF
|