From 56965976b115a8f088e1b82b8a9a4de226780efd Mon Sep 17 00:00:00 2001 From: Candle <50766841+CandleHater@users.noreply.github.com> Date: Thu, 16 Jan 2020 12:07:02 +0100 Subject: [PATCH] Disable Bluetooth Disabling Bluetooth offers more security and also brings a small performance improvement. As Bluetooth is anyway not actively used on a RaspiBlitz, it's services and packages can be removed. Also the Bluetooth module is disabled in ``/boot/config.txt``. --- build_sdcard.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index cbf8847f2..a376dee21 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -699,6 +699,21 @@ echo "*** HARDENING ***" # fail2ban (no config required) sudo apt-get install -y --no-install-recommends python3-systemd fail2ban +if [ "${baseImage}" = "raspbian" ]; then + echo "" + echo "*** DISABLE BLUETOOTH ***" + + # disable bluetooth module + sudo sh -c "echo 'dtoverlay=pi3-disable-bt' >> /boot/config.txt" + + # remove bluetooth services + sudo systemctl disable bluetooth.service + sudo systemctl disable hciuart.service + + # remove bluetooth packages + sudo apt remove -y --purge pi-bluetooth bluez bluez-firmware +fi + # *** BOOTSTRAP *** # see background README for details echo "" @@ -816,7 +831,6 @@ if [ "${baseImage}" = "raspbian" ]; then framebuffer_width=800 framebuffer_height=480 - enable_dpi_lcd=1 display_default_lcd=1 dpi_group=2