From 623f5ce9e5ece267d68ec9cfff4785538b0b3029 Mon Sep 17 00:00:00 2001 From: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com> Date: Sun, 19 Nov 2023 22:11:51 +0000 Subject: [PATCH] Fix HyperBian build (thanks @Lord-Grey) --- config | 1 + stage-hyperbian/00-install-hyperion/00-run.sh | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/config b/config index aade2da..a0295a1 100644 --- a/config +++ b/config @@ -4,3 +4,4 @@ TARGET_HOSTNAME='HyperBian' DISABLE_FIRST_BOOT_USER_RENAME=1 FIRST_USER_NAME='hyperion' FIRST_USER_PASS='ambientlight' +SUDO_USER='hyperion' diff --git a/stage-hyperbian/00-install-hyperion/00-run.sh b/stage-hyperbian/00-install-hyperion/00-run.sh index 993467b..203c6c3 100755 --- a/stage-hyperbian/00-install-hyperion/00-run.sh +++ b/stage-hyperbian/00-install-hyperion/00-run.sh @@ -1,6 +1,7 @@ #!/bin/bash -e # Enable SPI and force HDMI output +echo '---> Enable SPI and force HDMI output' sed -i "s/^#dtparam=spi=on.*/dtparam=spi=on/" ${ROOTFS_DIR}/boot/config.txt sed -i "s/^#hdmi_force_hotplug=1.*/hdmi_force_hotplug=1/" ${ROOTFS_DIR}/boot/config.txt @@ -8,6 +9,7 @@ sed -i "s/^#hdmi_force_hotplug=1.*/hdmi_force_hotplug=1/" ${ROOTFS_DIR}/boot/con HYPERION_VERSION=$(curl -sL "https://github.com/hyperion-project/hyperion.ng/raw/master/.version") # Modify /usr/lib/os-release +echo '---> Customize HyperBian' sed -i "s/Raspbian/HyperBian/gI" ${ROOTFS_DIR}/usr/lib/os-release sed -i "s/^NAME=.*$/NAME=\"HyperBian ${HYPERION_VERSION}\"/g" ${ROOTFS_DIR}/usr/lib/os-release sed -i "s/^VERSION=.*$/VERSION=\"${HYPERION_VERSION}\"/g" ${ROOTFS_DIR}/usr/lib/os-release @@ -16,8 +18,8 @@ sed -i "s/^SUPPORT_URL=.*$/SUPPORT_URL=\"https:\/\/hyperion-project.org\/\"/g" $ sed -i "s/^BUG_REPORT_URL=.*$/BUG_REPORT_URL=\"https:\/\/hyperion-project.org\/\"/g" ${ROOTFS_DIR}/usr/lib/os-release # Custom motd -rm "${ROOTFS_DIR}"/etc/motd -rm "${ROOTFS_DIR}"/etc/update-motd.d/10-uname +rm -f "${ROOTFS_DIR}"/etc/motd +rm -f "${ROOTFS_DIR}"/etc/update-motd.d/10-uname install -m 755 files/motd-hyperbian "${ROOTFS_DIR}"/etc/update-motd.d/10-hyperbian # DEB822 source file @@ -27,10 +29,10 @@ install -m 644 files/hyperion.sources ${ROOTFS_DIR}/etc/apt/sources.list.d/ sed -i "s/^#PrintLastLog yes.*/PrintLastLog no/" ${ROOTFS_DIR}/etc/ssh/sshd_config on_chroot << EOF -echo '---> Import the public GPG key from the Repository Server into HyperBian' +echo '---> Import public repository key into HyperBian' wget -qO- https://releases.hyperion-project.org/hyperion.pub.key | gpg --dearmor -o /usr/share/keyrings/hyperion.pub.gpg -echo '---> Update the APT sources and installing Hyperion' +echo '---> Update and installing Hyperion' apt-get update && apt-get -y install hyperion -echo 'Registering Hyperion' +echo '---> Registering Hyperion' systemctl -q enable hyperion"@hyperion".service EOF