From 574ecd7387079e1ece6c206860f850661efe813d Mon Sep 17 00:00:00 2001 From: cimryan Date: Sat, 27 Oct 2018 09:29:25 -0700 Subject: [PATCH 1/2] Use the numeric comparison operator to determine if $NUM_FILES_MOVED is greater than 0 --- run/send-pushover | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run/send-pushover b/run/send-pushover index 9d5ffa5..7fc5402 100644 --- a/run/send-pushover +++ b/run/send-pushover @@ -7,7 +7,7 @@ function log () { echo "$1" >> "$LOG_FILE" } -if [ -r "/root/.teslaCamPushoverCredentials" ] && [ $NUM_FILES_MOVED > 0 ] +if [ -r "/root/.teslaCamPushoverCredentials" ] && [ $NUM_FILES_MOVED -gt 0 ] then log "Sending Pushover message for moved files." From 2bd310814c72b4767c4f4d7e0eeb2b997ce83878 Mon Sep 17 00:00:00 2001 From: cimryan Date: Sat, 27 Oct 2018 09:34:44 -0700 Subject: [PATCH 2/2] Switch the order of the music and cam backing files in g_mass_storage.conf This ordering makes the music partition appear in the view in the Tesla. --- setup/pi/create-backingfiles.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/pi/create-backingfiles.sh b/setup/pi/create-backingfiles.sh index f7aa695..a3301db 100644 --- a/setup/pi/create-backingfiles.sh +++ b/setup/pi/create-backingfiles.sh @@ -38,7 +38,7 @@ then MUSIC_DISK_SIZE="$(df --output=avail --block-size=1K $BACKINGFILES_MOUNTPOINT/ | tail -n 1)" MUSIC_DISK_FILE_NAME="$BACKINGFILES_MOUNTPOINT/music_disk.bin" add_drive "music" "MUSIC" "$MUSIC_DISK_SIZE" "$MUSIC_DISK_FILE_NAME" - echo "options g_mass_storage file=$CAM_DISK_FILE_NAME,$MUSIC_DISK_FILE_NAME removable=1,1 ro=0,0 stall=0 iSerialNumber=123456" > "$G_MASS_STORAGE_CONF_FILE_NAME" + echo "options g_mass_storage file=$MUSIC_DISK_FILE_NAME,$CAM_DISK_FILE_NAME removable=1,1 ro=0,0 stall=0 iSerialNumber=123456" > "$G_MASS_STORAGE_CONF_FILE_NAME" else echo "options g_mass_storage file=$CAM_DISK_FILE_NAME removable=1 ro=0 stall=0 iSerialNumber=123456" > "$G_MASS_STORAGE_CONF_FILE_NAME" fi