From 6036492cc54533a1608a4e3742760d955de86626 Mon Sep 17 00:00:00 2001 From: paukstelis Date: Tue, 27 Sep 2022 21:11:32 -0400 Subject: [PATCH] replace journal with dmesg --- octoprint_deploy.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/octoprint_deploy.sh b/octoprint_deploy.sh index 9b8148e..0bccb9a 100755 --- a/octoprint_deploy.sh +++ b/octoprint_deploy.sh @@ -454,14 +454,15 @@ add_camera() { detect_printer() { echo echo - journalctl --rotate > /dev/null 2>&1 - journalctl --vacuum-time=1seconds > /dev/null 2>&1 + #journalctl --rotate > /dev/null 2>&1 + #journalctl --vacuum-time=1seconds > /dev/null 2>&1 + dmesg -C echo "Plug your printer in via USB now (detection time-out in 1 min)" counter=0 while [[ -z "$UDEV" ]] && [[ $counter -lt 30 ]]; do - UDEV=$(timeout 1s journalctl -kf | sed -n -e 's/^.*SerialNumber: //p') + UDEV=$(timeout 1s dmesg -w | sed -n -e 's/^.*SerialNumber: //p') if [[ -z "$TEMPUSB" ]]; then - TEMPUSB=$(timeout 1s journalctl -kf | sed -n -e 's/^.*\(cdc_acm\|ftdi_sio\|ch341\|cp210x\) \([0-9].*[0-9]\): \(tty.*\|FTD.*\|ch341-uart.*\|cp210x\).*/\2/p') + TEMPUSB=$(timeout 1s dmesg -w | sed -n -e 's/^.*\(cdc_acm\|ftdi_sio\|ch341\|cp210x\) \([0-9].*[0-9]\): \(tty.*\|FTD.*\|ch341-uart.*\|cp210x\).*/\2/p') else sleep 1 fi