#!/bin/bash set -e # On Raspberry if a tpuart works on /dev/ttyAMA0, some services have to be deactivated # see: https://busware.de/tiki-index.php?page=ROT_Installation if [ -e /dev/ttyAMA0 ] then if grep ttyAMA0 /etc/inittab then grep -v ttyAMA0 /etc/inittab >/etc/inittab.tmp mv /etc/inittab.tmp /etc/inittab fi if grep ttyAMA0 /etc/inittab then grep -v ttyAMA0 /boot/cmdline.txt >/boot/cmdline.txt.tmp mv /boot/cmdline.txt.tmp /boot/cmdline.txt echo "--------------------- reboot system! ---------------------------" fi systemctl stop serial-getty@ttyAMA0.service systemctl disable serial-getty@ttyAMA0.service systemctl mask serial-getty@ttyAMA0.service fi systemctl enable eibd || true systemctl start eibd || true