|
|
@ -584,15 +584,6 @@ if [ "${baseImage}" = "raspbian" ]; then |
|
|
|
sudo bash -c 'echo "SCRIPT=/home/admin/00infoLCD.sh" >> /home/pi/.bashrc' |
|
|
|
sudo bash -c 'echo "# replace shell with script => logout when exiting script" >> /home/pi/.bashrc' |
|
|
|
sudo bash -c 'echo "exec \$SCRIPT" >> /home/pi/.bashrc' |
|
|
|
fi |
|
|
|
|
|
|
|
if [ "${baseImage}" = "dietpi" ]; then |
|
|
|
# bash autostart for dietpi |
|
|
|
sudo bash -c 'echo "# automatic start the LCD info loop" >> /home/dietpi/.bashrc' |
|
|
|
sudo bash -c 'echo "SCRIPT=/home/admin/00infoLCD.sh" >> /home/dietpi/.bashrc' |
|
|
|
sudo bash -c 'echo "# replace shell with script => logout when exiting script" >> /home/dietpi/.bashrc' |
|
|
|
sudo bash -c 'echo "exec \$SCRIPT" >> /home/dietpi/.bashrc' |
|
|
|
fi |
|
|
|
|
|
|
|
# create /home/admin/setup.sh - which will get executed after reboot by autologin pi user |
|
|
|
cat > /home/admin/setup.sh <<EOF |
|
|
@ -602,6 +593,15 @@ sudo sed --in-place -i "57s/.*/dtoverlay=tft35a:rotate=270/" /boot/config.txt |
|
|
|
|
|
|
|
EOF |
|
|
|
sudo chmod +x /home/admin/setup.sh |
|
|
|
fi |
|
|
|
|
|
|
|
if [ "${baseImage}" = "dietpi" ]; then |
|
|
|
# bash autostart for dietpi |
|
|
|
sudo bash -c 'echo "# automatic start the LCD info loop" >> /home/dietpi/.bashrc' |
|
|
|
sudo bash -c 'echo "SCRIPT=/home/admin/00infoLCD.sh" >> /home/dietpi/.bashrc' |
|
|
|
sudo bash -c 'echo "# replace shell with script => logout when exiting script" >> /home/dietpi/.bashrc' |
|
|
|
sudo bash -c 'echo "exec \$SCRIPT" >> /home/dietpi/.bashrc' |
|
|
|
fi |
|
|
|
|
|
|
|
echo "" |
|
|
|
echo "*** HARDENING ***" |
|
|
@ -671,6 +671,8 @@ if [ "${baseImage}" = "dietpi" ]; then |
|
|
|
sudo cp ./usr/cmdline.txt /DietPi/ |
|
|
|
sudo cp ./usr/inittab /etc/ |
|
|
|
sudo cp ./boot/config-35.txt /DietPi/config.txt |
|
|
|
# make LCD screen rotation correct |
|
|
|
sudo sed -i "s/dtoverlay=tft35a/dtoverlay=tft35a:rotate=270/" /DietPi/config.txt |
|
|
|
echo "to continue reboot with \`sudo shutdown -r now \` and login with admin" |
|
|
|
fi |
|
|
|
|
|
|
|