From 967fbd29994460b959c12b17bb1ebe0b51e95ba4 Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Thu, 28 Oct 2021 11:15:16 -0700 Subject: [PATCH] Use raspi-config to manage the boot config --- easyinstall.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/easyinstall.sh b/easyinstall.sh index 37e39aa8..ebdc49e0 100755 --- a/easyinstall.sh +++ b/easyinstall.sh @@ -169,14 +169,10 @@ function installRaScsiScreen() { if [[ $(grep -c "^dtparam=i2c_arm=on" /boot/config.txt) -ge 1 ]]; then echo "NOTE: I2C support seems to have been configured already." REBOOT=0 - elif [[ $(grep -c "^dtparam=i2c_arm=off" /boot/config.txt) -ge 1 ]]; then - echo "NOTE: I2C support seems to have been disabled; We will override that configuration in /boot/config.txt" - sudo sed -i /^dtparam=i2c_arm/d /boot/config.txt - sudo bash -c 'echo "dtparam=i2c_arm=on" >> /boot/config.txt' - REBOOT=1 else - sudo bash -c 'echo "dtparam=i2c_arm=on" >> /boot/config.txt' - echo "Modified /boot/config.txt" + sudo raspi-config nonint do_i2c 0