workaround possible TEMPUSB

Failures on detecting TEMPUSB in some cases. Possibly overwritten?
This commit is contained in:
paukstelis
2022-05-11 10:38:04 -04:00
committed by GitHub
parent 08fec9a71a
commit 8683549ade

View File

@@ -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