remove console wait for dmesg

This commit is contained in:
paukstelis
2022-09-28 19:59:43 -04:00
parent 8f8c9006cb
commit fc05a04994

View File

@@ -383,8 +383,8 @@ add_camera() {
echo "Plug your camera in via USB now (detection time-out in 1 min)"
counter=0
while [[ -z "$CAM" ]] && [[ $counter -lt 30 ]]; do
CAM=$(dmesg -w | sed -n -e 's/^.*SerialNumber: //p')
TEMPUSBCAM=$(dmesg -w | sed -n -e 's|^.*input:.*/\(.*\)/input/input.*|\1|p')
CAM=$(dmesg | sed -n -e 's/^.*SerialNumber: //p')
TEMPUSBCAM=$(dmesg | sed -n -e 's|^.*input:.*/\(.*\)/input/input.*|\1|p')
counter=$(( $counter + 1 ))
if [[ -n "$TEMPUSBCAM" ]] && [[ -z "$CAM" ]]; then
break
@@ -464,8 +464,8 @@ detect_printer() {
echo "Plug your printer in via USB now (detection time-out in 1 min)"
counter=0
while [[ -z "$UDEV" ]] && [[ $counter -lt 30 ]]; do
TEMPUSB=$(dmesg -w | sed -n -e 's/^.*\(cdc_acm\|ftdi_sio\|ch341\|cp210x\) \([0-9].*[0-9]\): \(tty.*\|FTD.*\|ch341-uart.*\|cp210x\).*/\2/p')
UDEV=$(dmesg -w | sed -n -e 's/^.*SerialNumber: //p')
TEMPUSB=$(dmesg | sed -n -e 's/^.*\(cdc_acm\|ftdi_sio\|ch341\|cp210x\) \([0-9].*[0-9]\): \(tty.*\|FTD.*\|ch341-uart.*\|cp210x\).*/\2/p')
UDEV=$(dmesg | sed -n -e 's/^.*SerialNumber: //p')
counter=$(( $counter + 1 ))
#No need to complete timeout in this case
if [[ -n "$TEMPUSB" ]] && [[ -z "$UDEV" ]]; then