Einstellungen für raspian/pi angepasst

This commit is contained in:
Steffen Probst
2021-09-07 16:03:42 +02:00
parent d9c34b6c40
commit f9457ebf7b
3 changed files with 40 additions and 14 deletions

View File

@ -11,6 +11,8 @@
#
# By default this script does nothing.
which chromium-browser > /dev/null && [ -d /etc/chromium ] && mv /etc/chromium/ /etc/chromium-browser
sleep 10
@ -26,7 +28,14 @@ fi
#fi
#Hostname wird anhand des WLAN0 erstell / kann auch entsprechend auf anderes Geraet umgestellt werden
echo thin$(cat /sys/class/net/wlan0/address | sed '/://g') > /tmp/hostname && hostname --file /tmp/hostname
#ip a s wlan1 2&>1 /dev/null ||
#Check einbauen der aktive Verbindung prüft
if [ -d /home/pi ]; then
echo pi$(cat /sys/class/net/wlan0/address | sed '/://g') > /tmp/hostname && hostname --file /tmp/hostname
else
echo thin$(cat /sys/class/net/wlan0/address | sed '/://g') > /tmp/hostname && hostname --file /tmp/hostname
fi
#Fuer eth0, wenn kein WLAN vorhanden ist. Kann dann auskommentiert werden.
#echo rpi$(cat /sys/class/net/eth0/address | sed '/://g') > /tmp/hostname && hostname --file /tmp/hostname
@ -34,8 +43,13 @@ echo thin$(cat /sys/class/net/wlan0/address | sed '/://g') > /tmp/hostname && ho
# start X environment
if [ -f /boot/client-cfg/xinitrc ]; then
ln -fs /boot/client-cfg/xinitrc /home/thinnote/.xinitrc;
su -l thinnote -s /bin/bash -c 'startx -- vt1' &
if [ -d /home/pi ]; then
ln -fs /boot/client-cfg/xinitrc /home/pi/.xinitrc;
su -l pi -s /bin/bash -c 'startx -- vt1' &
else
ln -fs /boot/client-cfg/xinitrc /home/thinnote/.xinitrc;
su -l thinnote -s /bin/bash -c 'startx -- vt1' &
fi
fi
exit 0