Check for teslacam folder

And other tweaks.
This commit is contained in:
Richard Goodwin
2018-10-21 14:04:23 -05:00
parent 5b4dd4538f
commit 5cfe22fb92
3 changed files with 11 additions and 4 deletions

View File

@@ -28,6 +28,7 @@ WORK IN PROGRESS BUT MOSTLY RIGHT
* Marker files will be created in `boot` like `TESLA_USB_SETUP_STARTED` and `TESLA_USB_SETUP_FINISHED` to track progress. May use a progress system so the script can pick back up if needed. (This is probably useful for the general/old way of setup too.)
* The Pi LED will flash patterns as it gets to each stage (labeled in the setup-teslausb-headless script).
* 10 flashes means setup failed!
* After the final stage and reboot the LED will go back to normal
#### Modifications to pi-gen builder from master

View File

@@ -272,13 +272,12 @@ configure_hostname
# SETUP STAGE 5 and reboot
# If you see 5 flashes we are probably good!
setup_log "SETUP STAGE 5: Marking successful and remounting filesystem readonly."
setup_log "SETUP STAGE 5: Marking successful and making filesystem readonly."
/etc/stage_flash 5
mark_setup_success
echo 0 | sudo tee /sys/class/leds/led0/brightness
make_root_fs_readonly
# echo 0 | sudo tee /sys/class/leds/led0/brightness
setup_log "Filesystems made read-only. Rebooting."
reboot

View File

@@ -41,6 +41,13 @@ function mount_mountpoint () {
if [ "$mounted" = true ]
then
log "Mounted $mount_point."
if [ -d "/mnt/cam/TeslaCam" ]
then
log "TeslaCam folder exists"
true
return
else
mkdir /mnt/cam/TeslaCam
true
return
else