Merge pull request #1281 from adevoss/v1.6

Extra parameters and checks in build script
This commit is contained in:
Christian Rotzoll 2020-06-25 17:34:08 +02:00 committed by GitHub
commit 6072f1acc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,19 +20,74 @@ echo "*** CHECK INPUT PARAMETERS ***"
wantedBranch="$1"
if [ ${#wantedBranch} -eq 0 ]; then
wantedBranch="master"
else
if [ "${wantedBranch}" == "-h" -o "${wantedBranch}" == "--help" ]; then
echo "Usage: [branch] [github user] [root partition] [LCD screen installed true|false] [Wifi disabled true|false]"
echo "Example (USB boot, no LCD and no wifi): $0 v1.6 rootzoll /dev/sdb2 false true"
exit 1
fi
fi
echo "will use code from branch --> '${wantedBranch}'"
# 2nd optional parameter is the GITHUB-USERNAME to get code from when
# provisioning sd card with raspiblitz assets/scripts later on
# if 2nd parameter is used - 1st is mandatory
echo "*** CHECK INPUT PARAMETERS ***"
githubUser="$2"
if [ ${#githubUser} -eq 0 ]; then
githubUser="rootzoll"
fi
echo "will use code from user --> '${githubUser}'"
# 3rd optional parameter is the root partition
rootPartition="$3"
if [ ${#rootPartition} -eq 0 ]; then
rootPartition="/dev/mmcblk0p2"
fi
echo "will use root partition --> '${rootPartition}'"
# 4th optional parameter is the LCD screen
lcdInstalled="$4"
if [ ${#lcdInstalled} -eq 0 ]; then
lcdInstalled="true"
else
if [ "${lcdInstalled}" != "false" ]; then
lcdInstalled="true"
fi
fi
echo "will activate LCD screen --> '${lcdInstalled}'"
# 5th optional parameter is Wifi
disableWifi="$5"
if [ ${#disableWifi} -eq 0 ]; then
disableWifi="false"
else
if [ "${disableWifi}" != "true" ]; then
disableWifi="false"
fi
fi
echo "will disable wifi --> '${disableWifi}'"
# 6th optional parameter is Wifi country
wifiCountry="$6"
if [ ${#wifiCountry} -eq 0 ]; then
wifiCountry="US"
fi
if [ "${disableWifi}" == "false" ]; then
echo "will use Wifi country --> '${wifiCountry}'"
fi
echo -n "Do you wish to install Raspiblitz branch ${wantedBranch}? (yes/no) "
read installRaspiblitzAnswer
if [ "$installRaspiblitzAnswer" == "yes" ] ;then
echo ""
echo ""
else
exit 1
fi
echo "Installing Raspiblitz..."
sleep 3
echo ""
@ -104,12 +159,12 @@ if [ "${baseImage}" = "raspbian" ] || [ "${baseImage}" = "dietpi" ] ; then
fi
# remove some (big) packages that are not needed
sudo apt-get remove -y --purge libreoffice* oracle-java* chromium-browser nuscratch scratch sonic-pi minecraft-pi plymouth python2
sudo apt-get clean
sudo apt-get -y autoremove
sudo apt remove -y --purge libreoffice* oracle-java* chromium-browser nuscratch scratch sonic-pi minecraft-pi plymouth python2
sudo apt clean
sudo apt -y autoremove
if [ -f "/usr/bin/python3.7" ]; then
# make sure /usr/bin/python exists (and calls Python3.7 in Debian Buster)
# make sure /usr/bin/python exists (and calls Python3.7 in Buster)
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 1
echo "python calls python3.7"
elif [ -f "/usr/bin/python3.8" ]; then
@ -124,9 +179,9 @@ fi
# update debian
echo ""
echo "*** UPDATE DEBIAN ***"
sudo apt-get update -y
sudo apt-get upgrade -f -y
echo "*** UPDATE ***"
sudo apt update -y
sudo apt upgrade -f -y
echo ""
echo "*** PREPARE ${baseImage} ***"
@ -144,15 +199,49 @@ if [ "${baseImage}" = "raspbian" ]; then
# set to wait until network is available on boot (0 seems to yes)
sudo raspi-config nonint do_boot_wait 0
# set WIFI country so boot does not block
sudo raspi-config nonint do_wifi_country US
if [ "${disableWifi}" == "false" ]; then
sudo raspi-config nonint do_wifi_country $wifiCountry
fi
# see https://github.com/rootzoll/raspiblitz/issues/428#issuecomment-472822840
echo "max_usb_current=1" | sudo tee -a /boot/config.txt
configFile="/boot/config.txt"
max_usb_current="max_usb_current=1"
max_usb_currentDone=$(cat $configFile|grep -c "$max_usb_current")
if [ ${max_usb_currentDone} -eq 0 ]; then
sudo echo "" >> $configFile
sudo echo "# Raspiblitz" >> $configFile
echo "$max_usb_current" | sudo tee -a $configFile
else
echo "$max_usb_current already in $configFile"
fi
# run fsck on sd boot partition on every startup to prevent "maintenance login" screen
# see: https://github.com/rootzoll/raspiblitz/issues/782#issuecomment-564981630
# use command to check last fsck check: sudo tune2fs -l /dev/mmcblk0p2
sudo tune2fs -c 1 /dev/mmcblk0p2
# use command to check last fsck check: sudo tune2fs -l ${rootPartition}
sudo tune2fs -c 1 ${rootPartition}
# see https://github.com/rootzoll/raspiblitz/issues/1053#issuecomment-600878695
sudo sed -i 's/^/fsck.mode=force fsck.repair=yes /g' /boot/cmdline.txt
# edit kernel parameters
kernelOptionsFile=/boot/cmdline.txt
fsOption1="fsck.mode=force"
fsOption2="fsck.repair=yes"
fsOption1InFile=$(cat ${kernelOptionsFile}|grep -c ${fsOption1})
fsOption2InFile=$(cat ${kernelOptionsFile}|grep -c ${fsOption2})
if [ ${fsOption1InFile} -eq 0 ]; then
sudo sed -i "s/^/$fsOption1 /g" "$kernelOptionsFile"
echo "$fsOption1 added to $kernelOptionsFile"
else
echo "$fsOption1 already in $kernelOptionsFile"
fi
if [ ${fsOption2InFile} -eq 0 ]; then
sudo sed -i "s/^/$fsOption2 /g" "$kernelOptionsFile"
echo "$fsOption2 added to $kernelOptionsFile"
else
echo "$fsOption2 already in $kernelOptionsFile"
fi
fi
# special prepare when Ubuntu or Armbian
@ -172,30 +261,32 @@ echo ""
echo "*** CONFIG ***"
# based on https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_20_pi.md#raspi-config
# set new default passwort for root user
# set new default password for root user
echo "root:raspiblitz" | sudo chpasswd
echo "pi:raspiblitz" | sudo chpasswd
if [ "${baseImage}" = "raspbian" ]; then
# set Raspi to boot up automatically with user pi (for the LCD)
# https://www.raspberrypi.org/forums/viewtopic.php?t=21632
sudo raspi-config nonint do_boot_behaviour B2
sudo bash -c "echo '[Service]' >> /etc/systemd/system/getty@tty1.service.d/autologin.conf"
sudo bash -c "echo 'ExecStart=' >> /etc/systemd/system/getty@tty1.service.d/autologin.conf"
sudo bash -c "echo 'ExecStart=-/sbin/agetty --autologin pi --noclear %I 38400 linux' >> /etc/systemd/system/getty@tty1.service.d/autologin.conf"
fi
if [ "${lcdInstalled}" == "true" ]; then
if [ "${baseImage}" = "raspbian" ]; then
# set Raspi to boot up automatically with user pi (for the LCD)
# https://www.raspberrypi.org/forums/viewtopic.php?t=21632
sudo raspi-config nonint do_boot_behaviour B2
sudo bash -c "echo '[Service]' >> /etc/systemd/system/getty@tty1.service.d/autologin.conf"
sudo bash -c "echo 'ExecStart=' >> /etc/systemd/system/getty@tty1.service.d/autologin.conf"
sudo bash -c "echo 'ExecStart=-/sbin/agetty --autologin pi --noclear %I 38400 linux' >> /etc/systemd/system/getty@tty1.service.d/autologin.conf"
fi
if [ "${baseImage}" = "dietpi" ]; then
# set DietPi to boot up automatically with user pi (for the LCD)
# requires AUTO_SETUP_AUTOSTART_TARGET_INDEX=7 in the dietpi.txt
# /DietPi/dietpi/dietpi-autostart overwrites /etc/systemd/system/getty@tty1.service.d/dietpi-autologin.conf on reboot
sudo sed -i 's/agetty --autologin root %I $TERM/agetty --autologin pi --noclear %I 38400 linux/' /DietPi/dietpi/dietpi-autostart
fi
if [ "${baseImage}" = "dietpi" ]; then
# set DietPi to boot up automatically with user pi (for the LCD)
# requires AUTO_SETUP_AUTOSTART_TARGET_INDEX=7 in the dietpi.txt
# /DietPi/dietpi/dietpi-autostart overwrites /etc/systemd/system/getty@tty1.service.d/dietpi-autologin.conf on reboot
sudo sed -i 's/agetty --autologin root %I $TERM/agetty --autologin pi --noclear %I 38400 linux/' /DietPi/dietpi/dietpi-autostart
fi
if [ "${baseImage}" = "ubuntu" ] || [ "${baseImage}" = "armbian" ]; then
sudo bash -c "echo '[Service]' >> /lib/systemd/system/getty@.service"
sudo bash -c "echo 'ExecStart=' >> /lib/systemd/system/getty@.service"
sudo bash -c "echo 'ExecStart=-/sbin/agetty --autologin pi --noclear %I 38400 linux' >> /lib/systemd/system/getty@.service"
if [ "${baseImage}" = "ubuntu" ] || [ "${baseImage}" = "armbian" ]; then
sudo bash -c "echo '[Service]' >> /lib/systemd/system/getty@.service"
sudo bash -c "echo 'ExecStart=' >> /lib/systemd/system/getty@.service"
sudo bash -c "echo 'ExecStart=-/sbin/agetty --autologin pi --noclear %I 38400 linux' >> /lib/systemd/system/getty@.service"
fi
fi
# change log rotates
@ -272,20 +363,20 @@ echo "*** SOFTWARE UPDATE ***"
# based on https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_20_pi.md#software-update
# installs like on RaspiBolt
sudo apt-get install -y htop git curl bash-completion vim jq dphys-swapfile bsdmainutils
sudo apt install -y htop git curl bash-completion vim jq dphys-swapfile bsdmainutils
# installs bandwidth monitoring for future statistics
sudo apt-get install -y vnstat
sudo apt install -y vnstat
# prepare for BTRFS data drive raid
sudo apt-get install -y btrfs-progs btrfs-tools
sudo apt install -y btrfs-progs btrfs-tools
# network tools
sudo apt-get install -y autossh telnet
sudo apt install -y autossh telnet
# prepare for display graphics mode
# see https://github.com/rootzoll/raspiblitz/pull/334
sudo apt-get install -y fbi
sudo apt install -y fbi
# prepare for powertest
sudo apt install -y sysbench
@ -319,10 +410,10 @@ sudo apt install -y netcat
sudo apt install -y openssh-client
sudo apt install -y openssh-sftp-server
# install killall, fuser
sudo apt-get install -y psmisc
sudo apt install -y psmisc
sudo apt-get clean
sudo apt-get -y autoremove
sudo apt clean
sudo apt -y autoremove
echo ""
echo "*** ADDING MAIN USER admin ***"
@ -581,7 +672,7 @@ sudo chown -R admin /home/admin
echo "*** Python DEFAULT libs & depenedencies ***"
# for setup schell scripts
sudo apt-get -y install dialog bc python3-dialog
sudo apt -y install dialog bc python3-dialog
# libs (for global python scripts)
sudo -H python3 -m pip install grpcio==1.29.0
@ -594,27 +685,38 @@ echo ""
echo "*** RASPIBLITZ EXTRAS ***"
# for background processes
sudo apt-get -y install screen
sudo apt -y install screen
# for multiple (detachable/background) sessions when using SSH
# https://github.com/rootzoll/raspiblitz/issues/990
sudo apt-get -y install tmux
sudo apt -y install tmux
# optimization for torrent download
sudo bash -c "echo 'net.core.rmem_max = 4194304' >> /etc/sysctl.conf"
sudo bash -c "echo 'net.core.wmem_max = 1048576' >> /etc/sysctl.conf"
# install a command-line fuzzy finder (https://github.com/junegunn/fzf)
sudo apt-get -y install fzf
sudo bash -c "echo 'source /usr/share/doc/fzf/examples/key-bindings.bash' >> /home/admin/.bashrc"
sudo apt -y install fzf
homeFile=/home/admin/.bashrc
keyBindings="source /usr/share/doc/fzf/examples/key-bindings.bash"
keyBindingsDone=$(cat ${homeFile}|grep -c ${keyBindings})
if [ ${keyBindingsDone} -eq 0 ]; then
sudo bash -c "echo 'source /usr/share/doc/fzf/examples/key-bindings.bash' >> /home/admin/.bashrc"
echo "key-bindings added to $homeFile"
else
echo "key-bindings already in $homeFile"
fi
# *** SHELL SCRIPTS AND ASSETS
# move files from gitclone
cd /home/admin/
sudo -u admin rm -rf /home/admin/raspiblitz
sudo -u admin git clone -b ${wantedBranch} https://github.com/${githubUser}/raspiblitz.git
sudo -u admin cp /home/admin/raspiblitz/home.admin/*.* /home/admin
sudo -u admin cp /home/admin/raspiblitz/home.admin/.tmux.conf /home/admin
sudo -u admin cp -r /home/admin/raspiblitz/home.admin/*.* /home/admin
sudo -u admin cp -r /home/admin/raspiblitz/home.admin/.tmux.conf /home/admin
sudo -u admin chmod +x *.sh
sudo -u admin cp -r /home/admin/raspiblitz/home.admin/assets /home/admin/
sudo -u admin cp -r /home/admin/raspiblitz/home.admin/config.scripts /home/admin/
@ -639,31 +741,62 @@ fi
# add /sbin to path for all
sudo bash -c "echo 'PATH=\$PATH:/sbin' >> /etc/profile"
# bash autostart for admin
sudo bash -c "echo '# shortcut commands' >> /home/admin/.bashrc"
sudo bash -c "echo 'source /home/admin/_commands.sh' >> /home/admin/.bashrc"
sudo bash -c "echo '# automatically start main menu for admin unless' >> /home/admin/.bashrc"
sudo bash -c "echo '# when running in a tmux session' >> /home/admin/.bashrc"
sudo bash -c "echo 'if [ -z \"\$TMUX\" ]; then' >> /home/admin/.bashrc"
sudo bash -c "echo ' ./00raspiblitz.sh' >> /home/admin/.bashrc"
sudo bash -c "echo 'fi' >> /home/admin/.bashrc"
homeFile=/home/admin/.bashrc
autostart="automatically start main menu"
autostartDone=$(cat $homeFile|grep -c "$autostart")
if [ "${baseImage}" = "raspbian" ] || [ "${baseImage}" = "armbian" ] || [ "${baseImage}" = "ubuntu" ]; then
# bash autostart for pi
# run as exec to dont allow easy physical access by keyboard
# see https://github.com/rootzoll/raspiblitz/issues/54
sudo bash -c 'echo "# automatic start the LCD info loop" >> /home/pi/.bashrc'
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'
if [ ${autostartDone} -eq 0 ]; then
# bash autostart for admin
sudo bash -c "echo '# shortcut commands' >> /home/admin/.bashrc"
sudo bash -c "echo 'source /home/admin/_commands.sh' >> /home/admin/.bashrc"
sudo bash -c "echo '# automatically start main menu for admin unless' >> /home/admin/.bashrc"
sudo bash -c "echo '# when running in a tmux session' >> /home/admin/.bashrc"
sudo bash -c "echo 'if [ -z \"\$TMUX\" ]; then' >> /home/admin/.bashrc"
sudo bash -c "echo ' ./00raspiblitz.sh' >> /home/admin/.bashrc"
sudo bash -c "echo 'fi' >> /home/admin/.bashrc"
echo "autostart added to $homeFile"
else
echo "autostart already in $homeFile"
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'
if [ "${lcdInstalled}" == "true" ]; then
if [ "${baseImage}" = "raspbian" ] || [ "${baseImage}" = "armbian" ] || [ "${baseImage}" = "ubuntu" ]; then
homeFile=/home/pi/.bashrc
autostart="automatic start the LCD"
autostartDone=$(cat $homeFile|grep -c "$autostart")
if [ ${autostartDone} -eq 0 ]; then
# bash autostart for pi
# run as exec to dont allow easy physical access by keyboard
# see https://github.com/rootzoll/raspiblitz/issues/54
sudo bash -c 'echo "# automatic start the LCD info loop" >> /home/pi/.bashrc'
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'
echo "autostart LCD added to $homeFile"
else
echo "autostart LCD already in $homeFile"
fi
fi
if [ "${baseImage}" = "dietpi" ]; then
homeFile=/home/dietpi/.bashrc
startLCD="automatic start the LCD"
autostartDone=$(cat $homeFile|grep -c "$startLCD")
if [ ${autostartDone} -eq 0 ]; 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'
echo "autostart LCD added to $homeFile"
else
echo "autostart LCD already in $homeFile"
fi
fi
fi
echo ""
@ -671,15 +804,32 @@ echo "*** HARDENING ***"
# based on https://stadicus.github.io/RaspiBolt/raspibolt_21_security.html
# fail2ban (no config required)
sudo apt-get install -y --no-install-recommends python3-systemd fail2ban
sudo apt install -y --no-install-recommends python3-systemd fail2ban
if [ "${baseImage}" = "raspbian" ]; then
if [ "${disableWifi}" == "true" ]; then
echo ""
echo "*** DISABLE WIFI ***"
sudo systemctl disable wpa_supplicant.service
sudo ifconfig wlan0 down
fi
echo ""
echo "*** DISABLE BLUETOOTH ***"
# disable bluetooth module
sudo sh -c "echo 'dtoverlay=pi3-disable-bt' >> /boot/config.txt"
sudo sh -c "echo 'dtoverlay=disable-bt' >> /boot/config.txt"
configFile="/boot/config.txt"
disableBT="dtoverlay=disable-bt"
disableBTDone=$(cat $configFile|grep -c "$disableBT")
if [ ${disableBTDone} -eq 0 ]; then
# disable bluetooth module
sudo echo "" >> $configFile
sudo echo "# Raspiblitz" >> $configFile
echo 'dtoverlay=pi3-disable-bt' | sudo tee -a $configFile
echo 'dtoverlay=disable-bt' | sudo tee -a $configFile
else
echo "disable BT already in $configFile"
fi
# remove bluetooth services
sudo systemctl disable bluetooth.service
@ -715,37 +865,40 @@ echo ""
# *** RASPIBLITZ LCD DRIVER (do last - because makes a reboot) ***
# based on https://www.elegoo.com/tutorial/Elegoo%203.5%20inch%20Touch%20Screen%20User%20Manual%20V1.00.2017.10.09.zip
if [ "${baseImage}" = "raspbian" ] || [ "${baseImage}" = "dietpi" ]; then
echo "*** LCD DRIVER ***"
echo "--> Downloading LCD Driver from Github"
cd /home/admin/
sudo -u admin git clone https://github.com/goodtft/LCD-show.git
sudo -u admin chmod -R 755 LCD-show
sudo -u admin chown -R admin:admin LCD-show
cd LCD-show/
# set comit hard to old version - that seemed to run better
#
sudo -u admin git reset --hard ce52014
if [ "${lcdInstalled}" == "true" ]; then
if [ "${baseImage}" = "raspbian" ] || [ "${baseImage}" = "dietpi" ]; then
echo "*** LCD DRIVER ***"
echo "--> Downloading LCD Driver from Github"
cd /home/admin/
sudo -u admin git clone https://github.com/goodtft/LCD-show.git
sudo -u admin chmod -R 755 LCD-show
sudo -u admin chown -R admin:admin LCD-show
cd LCD-show/
# set comit hard to old version - that seemed to run better
#
sudo -u admin git reset --hard ce52014
# install xinput calibrator package
echo "--> install xinput calibrator package"
sudo dpkg -i xinput-calibrator_0.7.5-1_armhf.deb
fi
# install xinput calibrator package
echo "--> install xinput calibrator package"
sudo apt install -y libxi6
sudo dpkg -i xinput-calibrator_0.7.5-1_armhf.deb
fi
# make dietpi preparations
if [ "${baseImage}" = "dietpi" ]; then
echo "--> dietpi preparations"
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
sudo mkdir /etc/X11/xorg.conf.d
sudo cp ./usr/tft35a-overlay.dtb /boot/overlays/
sudo cp ./usr/tft35a-overlay.dtb /boot/overlays/tft35a.dtbo
sudo cp -rf ./usr/99-calibration.conf-35 /etc/X11/xorg.conf.d/99-calibration.conf
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/
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
# make dietpi preparations
if [ "${baseImage}" = "dietpi" ]; then
echo "--> dietpi preparations"
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
sudo mkdir /etc/X11/xorg.conf.d
sudo cp ./usr/tft35a-overlay.dtb /boot/overlays/
sudo cp ./usr/tft35a-overlay.dtb /boot/overlays/tft35a.dtbo
sudo cp -rf ./usr/99-calibration.conf-35 /etc/X11/xorg.conf.d/99-calibration.conf
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/
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
fi
fi
# *** RASPIBLITZ IMAGE READY ***
@ -754,27 +907,36 @@ echo "**********************************************"
echo "SD CARD BUILD DONE"
echo "**********************************************"
echo ""
echo "Your SD Card Image for RaspiBlitz is almost ready."
if [ "${baseImage}" = "raspbian" ]; then
echo "Last step is to install LCD drivers. This will reboot your Pi when done."
echo ""
if [ "${lcdInstalled}" == "true" ]; then
echo "Your SD Card Image for RaspiBlitz is almost ready."
if [ "${baseImage}" = "raspbian" ]; then
echo "Last step is to install LCD drivers. This will reboot your Pi when done."
echo ""
fi
else
echo "Your SD Card Image for RaspiBlitz is ready."
fi
echo "Take the chance & look thru the output above if you can spot any errror."
echo ""
echo "After final reboot - your SD Card Image is ready."
echo ""
if [ "${lcdInstalled}" == "true" ]; then
echo "After final reboot - your SD Card Image is ready."
echo ""
fi
echo "IMPORTANT IF WANT TO MAKE A RELEASE IMAGE FROM THIS BUILD:"
echo "login once after reboot without external HDD/SSD and run 'XXprepareRelease.sh'"
echo "REMEMBER for login now use --> user:admin password:raspiblitz"
echo ""
# activate LCD and trigger reboot
# dont do this on dietpi to allow for automatic build
if [ "${baseImage}" = "raspbian" ]; then
sudo chmod +x -R /home/admin/LCD-show
cd /home/admin/LCD-show/
sudo apt-mark hold raspberrypi-bootloader
sudo ./LCD35-show
else
echo "Use 'sudo reboot' to restart manually."
if [ "${lcdInstalled}" == "true" ]; then
# activate LCD and trigger reboot
# dont do this on dietpi to allow for automatic build
if [ "${baseImage}" = "raspbian" ]; then
sudo chmod +x -R /home/admin/LCD-show
cd /home/admin/LCD-show/
sudo apt-mark hold raspberrypi-bootloader
sudo ./LCD35-show
else
echo "Use 'sudo reboot' to restart manually."
fi
fi