From b38742a5c26ef03693726cd9284bf6c632fb9789 Mon Sep 17 00:00:00 2001 From: DeadEnd <45110141+DeadEnded@users.noreply.github.com> Date: Wed, 29 Jan 2020 11:42:54 -0500 Subject: [PATCH 1/3] remove reference to merged and deleted tag The @use-byte-string-for-identity-hints tag was merged to master for https://github.com/drbild/sslpsk.git. install_prereq.sh currently fails due to this. Removing tag to fix this. --- install_prereq.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_prereq.sh b/install_prereq.sh index 1a0be8c..956e37a 100755 --- a/install_prereq.sh +++ b/install_prereq.sh @@ -5,6 +5,6 @@ set -e sudo apt-get update sudo apt-get install -y git iw dnsmasq hostapd screen curl build-essential python3-pip python3-setuptools python3-wheel python3-dev mosquitto haveged net-tools libssl-dev -sudo -H python3 -m pip install --upgrade paho-mqtt tornado git+https://github.com/drbild/sslpsk.git@use-byte-string-for-identity-hints pycryptodomex +sudo -H python3 -m pip install --upgrade paho-mqtt tornado git+https://github.com/drbild/sslpsk.git pycryptodomex echo "Ready to start upgrade" From a07f3d7e5d4d89b0f303bbb6753344f71cb98116 Mon Sep 17 00:00:00 2001 From: Colin Kuebler Date: Wed, 29 Jan 2020 11:57:49 -0500 Subject: [PATCH 2/3] Add timeout on backup and allow user to continue anyway, fix #437 --- start_flash.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/start_flash.sh b/start_flash.sh index e889e4c..bbed451 100755 --- a/start_flash.sh +++ b/start_flash.sh @@ -94,7 +94,14 @@ while true; do backupfolder="../backups/$timestamp" mkdir -p "$backupfolder" pushd "$backupfolder" >/dev/null || exit - curl -JO http://10.42.42.42/backup + + if ! curl -JOm 90 http://10.42.42.42/backup; then + echo "Could not fetch a complete backup" + read -p "Do you want to continue anyway? [y/N] " -n 1 -r + echo + [[ "$REPLY" =~ ^[Yy]$ ]] || break + sleep 2 + fi echo "======================================================" echo "Getting Info from IoT-device" From 52279571971fabcbe8bc4d8f5fb536bb63a695b6 Mon Sep 17 00:00:00 2001 From: Colin Kuebler Date: Wed, 29 Jan 2020 11:59:33 -0500 Subject: [PATCH 3/3] Attempt to stop firewalls, fix #518 --- scripts/setup_checks.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/setup_checks.sh b/scripts/setup_checks.sh index 32c50fb..0a6e4a4 100755 --- a/scripts/setup_checks.sh +++ b/scripts/setup_checks.sh @@ -102,6 +102,17 @@ check_port () { fi } +check_firewall () { + if sudo systemctl stop firewalld.service &>/dev/null; then + echo "Attempting to stop firewalld.service" + echo "When done, enable with: ${bold}sudo systemctl start firewalld.service${normal}" + fi + if sudo ufw status | grep -qw active; then + sudo ufw disable + echo "When done, enable with: ${bold}sudo ufw enable${normal}" + fi +} + check_blacklist () { if [ -e /etc/modprobe.d/blacklist-rtl8192cu.conf ]; then echo "Detected /etc/modprobe.d/blacklist-rtl8192cu.conf" @@ -125,5 +136,6 @@ check_port udp 6666 "detect unencrypted Tuya firmware" check_port udp 6667 "detect encrypted Tuya firmware" check_port tcp 1883 "run MQTT" check_port tcp 8886 "run MQTTS" +check_firewall check_blacklist