remove console wait for dmesg
This commit is contained in:
@@ -383,8 +383,8 @@ add_camera() {
|
|||||||
echo "Plug your camera in via USB now (detection time-out in 1 min)"
|
echo "Plug your camera in via USB now (detection time-out in 1 min)"
|
||||||
counter=0
|
counter=0
|
||||||
while [[ -z "$CAM" ]] && [[ $counter -lt 30 ]]; do
|
while [[ -z "$CAM" ]] && [[ $counter -lt 30 ]]; do
|
||||||
CAM=$(dmesg -w | sed -n -e 's/^.*SerialNumber: //p')
|
CAM=$(dmesg | sed -n -e 's/^.*SerialNumber: //p')
|
||||||
TEMPUSBCAM=$(dmesg -w | sed -n -e 's|^.*input:.*/\(.*\)/input/input.*|\1|p')
|
TEMPUSBCAM=$(dmesg | sed -n -e 's|^.*input:.*/\(.*\)/input/input.*|\1|p')
|
||||||
counter=$(( $counter + 1 ))
|
counter=$(( $counter + 1 ))
|
||||||
if [[ -n "$TEMPUSBCAM" ]] && [[ -z "$CAM" ]]; then
|
if [[ -n "$TEMPUSBCAM" ]] && [[ -z "$CAM" ]]; then
|
||||||
break
|
break
|
||||||
@@ -464,8 +464,8 @@ detect_printer() {
|
|||||||
echo "Plug your printer in via USB now (detection time-out in 1 min)"
|
echo "Plug your printer in via USB now (detection time-out in 1 min)"
|
||||||
counter=0
|
counter=0
|
||||||
while [[ -z "$UDEV" ]] && [[ $counter -lt 30 ]]; do
|
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')
|
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 -w | sed -n -e 's/^.*SerialNumber: //p')
|
UDEV=$(dmesg | sed -n -e 's/^.*SerialNumber: //p')
|
||||||
counter=$(( $counter + 1 ))
|
counter=$(( $counter + 1 ))
|
||||||
#No need to complete timeout in this case
|
#No need to complete timeout in this case
|
||||||
if [[ -n "$TEMPUSB" ]] && [[ -z "$UDEV" ]]; then
|
if [[ -n "$TEMPUSB" ]] && [[ -z "$UDEV" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user