Use more reliable grep method

This commit is contained in:
Joshua Boniface 2023-09-01 15:41:57 -04:00
parent 4a43285ae2
commit 9af47557f1
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ echo
if [[ ${#active_ttys} -gt 1 ]]; then if [[ ${#active_ttys} -gt 1 ]]; then
if [[ "${active_ttys[@]}" =~ "ttyS" ]]; then if [[ "${active_ttys[@]}" =~ "ttyS" ]]; then
if [[ "${this_tty}" =~ "tty[0-9]+" ]]; then if grep -q -E -o "tty[0-9]+" <<<"${this_tty}"; then
echo "Found more than one TTY and at least one serial TTY!" echo "Found more than one TTY and at least one serial TTY!"
echo -n "If you wish to run the installer on this graphical TTY instead of the serial TTY, press enter within 15 seconds... " echo -n "If you wish to run the installer on this graphical TTY instead of the serial TTY, press enter within 15 seconds... "
if ! read -t 15; then if ! read -t 15; then