From d95cdfd7ec93dc74003d49cbf5d3441fe0d3e501 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 14 Jan 2024 16:07:06 +0100 Subject: [PATCH] New bookworm install script: force read from /dev/tty, otherwise stdin is 'not what you expect' in a curl|bash context ... credits to ljf --- bookworm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bookworm b/bookworm index 0670541..54e3d8b 100755 --- a/bookworm +++ b/bookworm @@ -290,7 +290,7 @@ function confirm_installation() { EOF - read -p " Are you sure you want to proceed (y/n) ? " choice + read -p " Are you sure you want to proceed (y/n) ? " choice < /dev/tty choice="$(echo $choice | tr '[A-Z]' '[a-z]')" [[ "$choice" == "yes" ]] || [[ "$choice" == "y" ]] || { error "Aborting"; return 1; } @@ -324,7 +324,7 @@ $(test -n "$ssh_port_warning" && echo -e "$ssh_port_warning") (Note that this will only be effective *after* you run YunoHost's postinstall) EOF - read -p " Should YunoHost override the SSH configuration (y/n) ? " choice + read -p " Should YunoHost override the SSH configuration (y/n) ? " choice < /dev/tty choice="$(echo $choice | tr '[A-Z]' '[a-z]')" if [[ "$choice" != "yes" ]] && [[ "$choice" != "y" ]] then