Skip to content
Snippets Groups Projects
Commit 29b70394 authored by tobiglaser's avatar tobiglaser
Browse files

"fix" missing i2c driver + add ip info

parent 2538293d
No related branches found
No related tags found
No related merge requests found
...@@ -126,7 +126,14 @@ ...@@ -126,7 +126,14 @@
if [ $I2C -eq 1 ] # if I2C is off if [ $I2C -eq 1 ] # if I2C is off
then then
echo " Turning on I2C." echo " Turning on I2C."
sudo raspi-config nonint do_i2c 0 a=$(sudo raspi-config nonint do_i2c 0)
# if the i2c driver was updated a reboot is necessary.
# "modprobe: FATAL: Module i2c-dev not found in directory /lib/modules/5.15.32-v7l+"
if echo $a | grep -i 'modprobe\|FATAL\|not found' > /dev/null
then
pleaseReboot=true
fi
else else
echo " I2C is active." echo " I2C is active."
break break
...@@ -162,6 +169,18 @@ ...@@ -162,6 +169,18 @@
sudo cp -r Arduino/* /home/$vncBaseName$i/Arduino/ sudo cp -r Arduino/* /home/$vncBaseName$i/Arduino/
done done
#display useful info
echo "Setup complete."
echo ""
echo "Hostname: $(hostname)"
echo "IP-Adress: $(hostname -I | awk '{print $1}')"
#display reboot message if necessary
if [ "{$pleaseReboot}" == "true"]
then
echo "PLEASE REBOOT"
fi
# Camera Stuff... # Camera Stuff...
#python3 -m pip install --upgrade --force-reinstall Pillow #python3 -m pip install --upgrade --force-reinstall Pillow
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment