@@ -341,7 +341,13 @@ pve_check() {
341341#
342342# - Validates system architecture is amd64/x86_64
343343# - Exits with error message for unsupported architectures (e.g., ARM/PiMox)
344- # - Provides link to ARM64-compatible scripts
344+ #
345+ # var_arm64 has three states:
346+ # yes - known to work, proceed silently
347+ # no - known to be broken (no arm64 artifact, x86-only dependency), abort
348+ # unknown - never verified on arm64 (default). Explain the situation and let
349+ # the user decide, since "no artifact exists" and "nobody tried"
350+ # are very different things and only the latter is worth attempting.
345351# ------------------------------------------------------------------------------
346352arch_check () {
347353 local arch
@@ -351,11 +357,38 @@ arch_check() {
351357 sleep 2
352358 exit 106
353359 fi
354- if [[ " $arch " == " arm64" && " ${var_arm64:- } " != " yes" ]]; then
355- msg_error " This script does not yet support arm64."
360+ [[ " $arch " != " arm64" ]] && return 0
361+
362+ case " ${var_arm64:- unknown} " in
363+ yes)
364+ return 0
365+ ;;
366+ no)
367+ msg_error " This script does not support arm64."
356368 sleep 2
357369 exit 106
358- fi
370+ ;;
371+ * )
372+ msg_warn " This script has not been verified on arm64."
373+ echo -e " ${TAB} It may work, or it may fail on an architecture-specific dependency."
374+ echo -e " ${TAB} If you try it, please report the outcome - success or failure:"
375+ echo -e " ${TAB}${BGN} https://github.com/community-scripts/ProxmoxVED/issues${CL} "
376+ echo " "
377+ if [[ ! -t 0 ]]; then
378+ msg_error " Not running interactively - refusing to guess on arm64. Set var_arm64=yes to override."
379+ sleep 2
380+ exit 106
381+ fi
382+ read -r -p " ${TAB} Continue anyway? (y/N): " arm64_prompt < /dev/tty
383+ if [[ " ${arm64_prompt,,} " =~ ^(y| yes)$ ]]; then
384+ msg_ok " Continuing on arm64 - thanks for testing"
385+ return 0
386+ fi
387+ msg_error " Aborted on arm64."
388+ sleep 2
389+ exit 106
390+ ;;
391+ esac
359392}
360393
361394# ------------------------------------------------------------------------------
@@ -691,7 +724,7 @@ msg_info() {
691724 # Pause mode: Wait for Enter after each step
692725 if [[ " ${DEV_MODE_PAUSE:- false} " == " true" ]]; then
693726 echo -en " \n${YWB} [PAUSE]${CL} Press Enter to continue..." >&2
694- read -r
727+ read -r < /dev/tty
695728 fi
696729 return
697730 fi
@@ -706,7 +739,7 @@ msg_info() {
706739 if [[ " ${DEV_MODE_PAUSE:- false} " == " true" ]]; then
707740 stop_spinner
708741 echo -en " \n${YWB} [PAUSE]${CL} Press Enter to continue..." >&2
709- read -r
742+ read -r < /dev/tty
710743 fi
711744}
712745
@@ -1116,7 +1149,7 @@ prompt_confirm() {
11161149 # Interactive prompt with timeout
11171150 echo -en " ${YW}${message} ${hint} (auto-${default} in ${timeout} s): ${CL} "
11181151
1119- if read -t " $timeout " -r response; then
1152+ if read -t " $timeout " -r response < /dev/tty ; then
11201153 # User provided input
11211154 response=" ${response,,} " # lowercase
11221155 case " $response " in
@@ -1209,7 +1242,7 @@ prompt_input() {
12091242 # Interactive prompt with timeout
12101243 echo -en " ${YW}${message}${hint} (auto-default in ${timeout} s): ${CL} " >&2
12111244
1212- if read -t " $timeout " -r response; then
1245+ if read -t " $timeout " -r response < /dev/tty ; then
12131246 # User provided input (or pressed Enter for empty)
12141247 if [[ -n " $response " ]]; then
12151248 echo " $response "
@@ -1311,7 +1344,7 @@ prompt_input_required() {
13111344
13121345 echo -en " ${YW}${message} (required, timeout ${timeout} s): ${CL} " >&2
13131346
1314- if read -t " $timeout " -r response; then
1347+ if read -t " $timeout " -r response < /dev/tty ; then
13151348 if [[ -z " $response " ]]; then
13161349 echo -e " ${YW} This field is required. Please enter a value. (attempt ${attempts} /3)${CL} " >&2
13171350 fi
@@ -1405,7 +1438,7 @@ prompt_select() {
14051438 echo -en " ${YW} Select [1-${num_options} ] (auto-select ${default} in ${timeout} s): ${CL} " >&2
14061439
14071440 local response
1408- if read -t " $timeout " -r response; then
1441+ if read -t " $timeout " -r response < /dev/tty ; then
14091442 if [[ -z " $response " ]]; then
14101443 # Empty response, use default
14111444 echo " ${options[$((default - 1))]} "
@@ -1488,7 +1521,7 @@ prompt_password() {
14881521 # Interactive prompt with timeout (silent input)
14891522 echo -en " ${YW}${message}${hint} (timeout ${timeout} s): ${CL} " >&2
14901523
1491- if read -t " $timeout " -rs response; then
1524+ if read -t " $timeout " -rs response < /dev/tty ; then
14921525 echo " " >&2 # Newline after hidden input
14931526 if [[ -n " $response " ]]; then
14941527 # Validate minimum length
0 commit comments