From 8683549ade8bdbc05f33698aaf7f088f3963f33a Mon Sep 17 00:00:00 2001 From: paukstelis Date: Wed, 11 May 2022 10:38:04 -0400 Subject: [PATCH] workaround possible TEMPUSB Failures on detecting TEMPUSB in some cases. Possibly overwritten? --- octoprint_deploy.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/octoprint_deploy.sh b/octoprint_deploy.sh index 11105e9..6050d4e 100755 --- a/octoprint_deploy.sh +++ b/octoprint_deploy.sh @@ -155,7 +155,11 @@ new_instance () { counter=0 while [[ -z "$UDEV" ]] && [[ $counter -lt 30 ]]; do UDEV=$(timeout 1s journalctl -kf | sed -n -e 's/^.*SerialNumber: //p') - TEMPUSB=$(timeout 1s journalctl -kf | sed -n -e 's/^.*\(cdc_acm\|ftdi_sio\|ch341\) \([0-9].*[0-9]\): \(tty.*\|FTD.*\|ch341-uart.*\).*/\2/p') + if [[ -z "$TEMPUSB" ]]; then + TEMPUSB=$(timeout 1s journalctl -kf | sed -n -e 's/^.*\(cdc_acm\|ftdi_sio\|ch341\) \([0-9].*[0-9]\): \(tty.*\|FTD.*\|ch341-uart.*\).*/\2/p') + else + sleep 1 + fi counter=$(( $counter + 1 )) done else