From e917829a9fb4872be23368d057eae315d33b0959 Mon Sep 17 00:00:00 2001 From: Richard Goodwin Date: Thu, 18 Oct 2018 07:32:08 -0500 Subject: [PATCH] Quotes in updater script, Readme updates, remount script. --- .DS_Store | Bin 8196 -> 0 bytes ...nLinux.md => GetShellWithoutMonitorOnLinux.md | 0 README.md | 7 ++++++- mac_linux_archive/update-rpi-mac-linux.sh | 11 ++++++++--- windows_archive/archive-teslacam-clips | 2 +- windows_archive/remountfs_rw | 9 +++++++++ windows_archive/setup-teslausb | 7 +++++++ 7 files changed, 31 insertions(+), 5 deletions(-) delete mode 100644 .DS_Store rename GetShellWitoutMonitorOnLinux.md => GetShellWithoutMonitorOnLinux.md (100%) create mode 100644 windows_archive/remountfs_rw diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 567b773d94b99ac317704e42aed77405de26ec6b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHLU2GIp6h5adFf&j(MUc)4bkn9%wMe%uZIB(1;h zP^wj4G^z0k6{0Vim>7H_!V`(`Vl@6dC<;n=@WBUt@zH2B@!Wf72`v;7joQSy$=q}2 zo^$R!=bP`&>{$T7o`Mkrr~?3rE+*Bb)ZL~rJ-cpc6~PQsBKZUOV1o$;MB(5q*5O2m zK!`wyK!`wyK#0IXK!Cp4tV#2H_k}j>Lj*zu{+9@__d}E}CgXve7Lva@sN*F7$ts%W zjmA_5aGz)(|`?k4BEcx2r~B5k{A@{q3e z&kR>zxY&L7eX_3c7rb&4w~4Mqxi}QP3nlO%1v=y*0~0h`1T$UoazS*Tq;t0A`K_&2 zu%fbR(c&eNBrTPyrKgh-f6m zn0fAO877(RAF>?7E%mqs$ME<%NuiKsS&~y~-Q;9@dwWZ?t+RcqB|5peJ=PN4)YUOH zB}=QDV%z!-WRD)3JU;c@DFHqPZ$Eluv)gG7?;X>&y<)FOyW;h7+E>eI%gR!%?+Ins zu$6J0q;^CU7e%D~T80tAm=9b@AxV6CeY2(v zdX%fG2Zk*h6lL%*J!sXV5Ln=`HbvWO>uJ+g4OzH#b}8CWQKYOs8BA{3s%XP>wz8C> zSBovdbi7;B#@WuhbkEs354-Vl7j^Y>^_zc>ZMF&gxJidT0;t8C=llTUn!qfN;p2ZLF9G=Gy z@giQrPw_MS8o$G9BF>63iTlNUxyS1?s-bA_aCV8r!P%`Cza5DqkL^?v|0#*TT_%`& z&&pNn8k;w?b#3jw@r36*)0@e~86_ygsZ^#4f2gzg$ylI8?o-yz$MLBI1d}J5u5N~ z+=wx3!w%er+li6g*o(WcA9v#bv2qOe<2a^JCsrQjtjyt2Jch?{irD!QzD(SF1z!!= z`6j-F@8X#`T&Rfcg+9)|3XhAj4wnW zMBr~AfK`cPqK6ik?={A1?I>Lb=wgl8O$*6gsN>~0NnVbV49anC8zocb6A$FHkTgT> WU;iWEAN~;=e*eSoKPUDA@BRcdqI7}) diff --git a/GetShellWitoutMonitorOnLinux.md b/GetShellWithoutMonitorOnLinux.md similarity index 100% rename from GetShellWitoutMonitorOnLinux.md rename to GetShellWithoutMonitorOnLinux.md diff --git a/README.md b/README.md index e64df37..40e9161 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ If you don't have a keyboard/HDMI setup to boot the Pi and edit/transfer files d * Follow [these instructions](GetShellWithoutMonitorOnWindows.md), then skip down to the section titled **Set up Set up Wifi on the Pi (manually)y**. #### macOS or Linux (Setup Wifi or USB Networking) -* Follow [these instructions](GetShellWitoutMonitorOnLinux.md), then proceed to the section **Set up the USB Storage Functionality**. +* Follow [these instructions](GetShellWithoutMonitorOnLinux.md), then proceed to the section **Set up the USB Storage Functionality**. ### Set up Wifi on the Pi (manually) @@ -168,6 +168,9 @@ Now that you have Wifi up and running, it's time to set up the USB Storage and s ``` reboot ``` + +After reboot, the Pi hostname will become `teslausb`, so future `ssh` sessions will be `ssh pi@teslausb.local`. + ### Get the Pi set up for your Tesla. If you set up the Pi with a keyboard and a monitor disconnect it and connect it to a PC. If you're using a cable be sure to use the port labeled "usb" on the circuitboard. 1. Wait for the Pi to show up on the PC as a USB drive. @@ -189,4 +192,6 @@ sudo -i mount / -o remount,rw mount /boot -o remount,rw ``` +A script has been provided as `/root/remountfs_rw` to run the mount commands for you more easily. + Then make whatever changes you need to. The next time the system boots the partitions will once again be read-only. diff --git a/mac_linux_archive/update-rpi-mac-linux.sh b/mac_linux_archive/update-rpi-mac-linux.sh index 7f0121d..5658def 100755 --- a/mac_linux_archive/update-rpi-mac-linux.sh +++ b/mac_linux_archive/update-rpi-mac-linux.sh @@ -15,7 +15,7 @@ #|| | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #|| # -# Script repurposed fromhttps://github.com/BigNate1234/rpi-USBSSH +# Script repurposed from https://github.com/BigNate1234/rpi-USBSSH # # This script will modify the cmdline.txt file on a freshly flashed Raspbian Stretch/Lite # It readies it for SSH, USB OTG, USB networking, and Wifi @@ -79,18 +79,23 @@ fi # Sets up wifi credentials so wifi will be # auto configured on first boot +if [ -r "wpa_supplicant.conf" ] +then + rm wpa_supplicant.conf +fi cat << EOF >> wpa_supplicant.conf ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ - ssid=$SSID - psk=$WIFIPASS + ssid="$SSID" + psk="$WIFIPASS" key_mgmt=WPA-PSK } EOF + cd echo "" echo '-- Files updated and ready for Wifi and SSH over USB --' diff --git a/windows_archive/archive-teslacam-clips b/windows_archive/archive-teslacam-clips index 681392c..3d3fdf7 100644 --- a/windows_archive/archive-teslacam-clips +++ b/windows_archive/archive-teslacam-clips @@ -81,7 +81,7 @@ function move_clips_to_archive () { done log "Moved $move_count file(s)." - if [ -r "/root/.teslaCamPushoverCredentials" ] + if [ -r "/root/.teslaCamPushoverCredentials" ] && [ $move_count > 0 ] then log "Sending Pushover message for copied files." /root/bin/send-pushover.sh $move_count diff --git a/windows_archive/remountfs_rw b/windows_archive/remountfs_rw new file mode 100644 index 0000000..9638b11 --- /dev/null +++ b/windows_archive/remountfs_rw @@ -0,0 +1,9 @@ +#!/bin/bash + +echo "Remounting / as read/write" +mount / -o remount,rw +echo "Remounting /boot as read/write" +mount /boot -o remount,rw +echo "Done. Make any changes needed, and reboot the Pi when ready." +echo "Filesystems / and /boot will be mounted as read only after reboot." + diff --git a/windows_archive/setup-teslausb b/windows_archive/setup-teslausb index 045360c..3925e35 100644 --- a/windows_archive/setup-teslausb +++ b/windows_archive/setup-teslausb @@ -133,8 +133,15 @@ function configure_archive_scripts () { chmod +x archive-teslacam-clips popd echo "Configured the archive scripts." + + pushd /root + wget https://raw.githubusercontent.com/"$REPO"/teslausb/"$BRANCH"/windows_archive/remountfs_rw + chmod +x remountfs_rw + popd + echo "Downloaded script to remount filesystems read/write if needed (/root/remountfs_rw)." } + function configure_pushover_scripts() { if [ ${user_enabled_pushover} = "true" ] then