Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

Razberry: Fix for not correctly setting value in /boot/config.txt #159

Merged
merged 1 commit into from
Apr 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions package/opt/hassbian/suites/razberry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,24 @@ if [[ $RPI_BOARD_REVISION == "a02082" || $RPI_BOARD_REVISION == "a22082" ]]
then
echo "Raspberry Pi 3 Detected. Disabling Bluetooth"
systemctl disable hciuart
if grep -q "dtoverlay=pi3-miniuart-bt" /boot/config.txt
if ! grep -q "dtoverlay=pi3-miniuart-bt" /boot/config.txt
then
echo "Adding 'dtoverlay=pi3-miniuart-bt' to /boot/config.txt"
echo "dtoverlay=pi3-miniuart-bt" >> /boot/config.txt
fi
fi

echo
echo "Installation done."
echo
echo "To continue have a look at https://home-assistant.io/components/emulated_hue/"
echo
validation=$(grep "dtoverlay=pi3-miniuart-bt" /boot/config.txt)
if [ ! -z "${validation}" ]; then
echo
echo -e "\\e[32mInstallation done..\\e[0m"
echo
else
echo
echo -e "\\e[31mInstallation failed..."
echo
return 1
fi
return 0
}

[[ "$_" == "$0" ]] && echo "hassbian-config helper script; do not run directly, use hassbian-config instead"