From 2e260c31ef899f9038a011a72627ebe3738ef402 Mon Sep 17 00:00:00 2001 From: Raphael <68374617+raphaelscholle@users.noreply.github.com> Date: Mon, 31 Jul 2023 19:40:06 +0200 Subject: [PATCH] reduce services and changes there a lot --- stages/03-Preconfiguration/01-run-chroot.sh | 87 +++++++++------------ 1 file changed, 36 insertions(+), 51 deletions(-) diff --git a/stages/03-Preconfiguration/01-run-chroot.sh b/stages/03-Preconfiguration/01-run-chroot.sh index fff643cf..90eff3e7 100755 --- a/stages/03-Preconfiguration/01-run-chroot.sh +++ b/stages/03-Preconfiguration/01-run-chroot.sh @@ -1,53 +1,38 @@ -# #!/bin/bash - -# # This runs in context if the image (CHROOT) -# # Any native compilation can be done here -# # Do not use log here, it will end up in the image -# # Here we configue all our services - -# #remove networking stuff -# rm -f /etc/init.d/dnsmasq -# rm -f /etc/init.d/dhcpcd - -# #disable unneeded services -# sudo systemctl disable dnsmasq.service -# sudo systemctl disable syslog.service -# echo "disabling journald" - -# #replace dhcpcd with network manager -# sudo systemctl disable dhcpcd.service -# sudo systemctl enable NetworkManager - -# sudo systemctl disable triggerhappy.service -# sudo systemctl disable avahi-daemon.service -# sudo systemctl disable ser2net.service -# sudo systemctl disable hciuart.service -# sudo systemctl disable anacron.service -# sudo systemctl disable exim4.service -# sudo systemctl mask hostapd.service -# sudo systemctl enable ssh #we have ssh constantly enabled - -# #Disable does not work on PLYMOUTH -# sudo systemctl mask plymouth-start.service -# sudo systemctl mask plymouth-read-write.service -# sudo systemctl mask plymouth-quit-wait.service -# sudo systemctl mask plymouth-quit.service -# if [[ "${OS}" != "ubuntu" ]] || [[ "${OS}" != "ubuntu-x86" ]]; then -# echo "OS is NOT ubuntu..disabling journald flush" -# sudo systemctl disable systemd-journal-flush.service -# fi - -# if [[ "${OS}" == "radxa" ]] ; then -# systemctl disable lightdm - -# fi - -# if [[ "${OS}" == "radxa-ubuntu-rock5a" ]] || [[ "${OS}" == "radxa-ubuntu-rock5b" ]] || [[ "${OS}" == "radxa-debian" ]] ; then -# systemctl disable lightdm -# fi - -# if [[ "${OS}" == "debian" ]]; then -# systemctl disable lightdm -# fi +#!/bin/bash + +# This runs in context if the image (CHROOT) +# Any native compilation can be done here +# Do not use log here, it will end up in the image +# Here we configue all our services + +if [[ "${OS}" == "raspian" ]] ; then +#We now use NetworkManager +rm -f /etc/init.d/dnsmasq +rm -f /etc/init.d/dhcpcd +sudo systemctl disable dnsmasq.service +sudo systemctl disable dhcpcd.service +sudo systemctl enable NetworkManager +sudo systemctl disable triggerhappy.service +sudo systemctl disable avahi-daemon.service +sudo systemctl disable ser2net.service +sudo systemctl disable hciuart.service +sudo systemctl disable anacron.service +sudo systemctl disable exim4.service +sudo systemctl mask hostapd.service + +#Disable plymoth (booot animation) +sudo systemctl mask plymouth-start.service +sudo systemctl mask plymouth-read-write.service +sudo systemctl mask plymouth-quit-wait.service +sudo systemctl mask plymouth-quit.service + +fi + + +#disable network-logging +sudo systemctl disable syslog.service + +#enable ssh for debug connections +sudo systemctl enable ssh