- An fstab entry for /dev/sda1 pointing to /mnt/usb-update
- Binary, scripts and public.pem all live in /home/pi/hdmi-switcher
-The usb-update script will naively look to see if /dev/sda1 exists. If it does, it mounts it and then copies over any files on the drive with names config.ini, video.mp4 to the cwd.
+The usb-update script will naively look to see if /dev/sda1 exists. If it does, it mounts it and then copies over any files on the drive with names config.ini, video.mp4 to /home/pi/hdmi-switcher
-In addition, it will update the software on the Pi. Unlike when config.ini and video.ini are copied, the software will always be extracted to /home/pi/hdmi-switcher (this is to stop me accidentally overwriting changes when I modify source code in /home/pi/hdmi-switcher-src)
+In addition, it will update the software on the Pi. This will only be copied if the signature can be verified. If a different version of the software is detected then the Pi is rebooted.
If you want to run the script on boot, you should use start.sh. start.sh runs the usb-update script, and then starts playing video.mp4 on a loop. It uses omxplayer (make sure whatever version you use has the --loop option). I would suggest simply adding the following to /etc/init.d/rc.local: