Skip to content

Commit

Permalink
reduce services and changes there a lot
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Jul 31, 2023
1 parent 304a839 commit 2e260c3
Showing 1 changed file with 36 additions and 51 deletions.
87 changes: 36 additions & 51 deletions stages/03-Preconfiguration/01-run-chroot.sh
Original file line number Diff line number Diff line change
@@ -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


0 comments on commit 2e260c3

Please sign in to comment.