From 5cfe22fb92ea06a703d176ab8c5c824572e00ed0 Mon Sep 17 00:00:00 2001 From: Richard Goodwin Date: Sun, 21 Oct 2018 14:04:23 -0500 Subject: [PATCH] Check for teslacam folder And other tweaks. --- headless-scripts/Readme.md | 1 + headless-scripts/setup-teslausb-headless | 5 ++--- windows_archive/archive-teslacam-clips | 9 ++++++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/headless-scripts/Readme.md b/headless-scripts/Readme.md index c93c0b8..4535a2b 100644 --- a/headless-scripts/Readme.md +++ b/headless-scripts/Readme.md @@ -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 diff --git a/headless-scripts/setup-teslausb-headless b/headless-scripts/setup-teslausb-headless index aed8d66..b713bf1 100644 --- a/headless-scripts/setup-teslausb-headless +++ b/headless-scripts/setup-teslausb-headless @@ -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 diff --git a/windows_archive/archive-teslacam-clips b/windows_archive/archive-teslacam-clips index 1ddd7c4..5349666 100644 --- a/windows_archive/archive-teslacam-clips +++ b/windows_archive/archive-teslacam-clips @@ -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 @@ -131,5 +138,5 @@ ensure_cam_drive_is_mounted move_clips_to_archive unmount_cam_drive - + connect_usb_drives_to_host \ No newline at end of file