From 4c967d7bcc52dbd4cb9192936b27fe0c7c6837cb Mon Sep 17 00:00:00 2001 From: paukstelis Date: Fri, 16 Apr 2021 19:16:48 -0400 Subject: [PATCH] Adjust prompt --- addnew_printer.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addnew_printer.sh b/addnew_printer.sh index 31ab03e..98b6813 100755 --- a/addnew_printer.sh +++ b/addnew_printer.sh @@ -127,7 +127,7 @@ if grep -q 'firstRun: true' $BFOLD/config.yaml; then exit 1 fi -prompt_confirm "Begin auto-detect printer serial number for udev entry?" || echo "OK. Restart when you are ready"; exit 0 +if prompt_confirm "Begin auto-detect printer serial number for udev entry?" echo #clear out journalctl - probably a better way to do this journalctl --rotate > /dev/null 2>&1 @@ -139,7 +139,10 @@ prompt_confirm "Begin auto-detect printer serial number for udev entry?" || echo TEMPUSB=$(timeout 1s journalctl -kf | sed -n -e 's/^.*\(cdc_acm\|ftdi_sio\|ch341\) \([0-9].*[0-9]\): \(tty.*\|FTD.*\|ch341-uart.*\).*/\2/p') counter=$(( $counter + 1 )) done -#fi +else + echo "OK. Restart when you are ready"; exit 0 +fi + if [ -z "$UDEV" ]; then echo "Printer Serial Number not detected"