From 07cc485ca3fcd303a290e99f9e7105c6a79ace85 Mon Sep 17 00:00:00 2001 From: yorickdowne <71337066+yorickdowne@users.noreply.github.com> Date: Mon, 22 Jul 2024 16:02:34 -0400 Subject: [PATCH] Fix riscv64 config (#1883) --- ethd | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/ethd b/ethd index a8ed0696..4b42d23a 100755 --- a/ethd +++ b/ethd @@ -2473,7 +2473,7 @@ screen.\n\nCustom testnets only work with a URL to fetch their configuration fro query_deployment() { if [ "${NETWORK}" = "gnosis" ]; then - if uname -a | grep -q riscv; then + if uname -m | grep -q riscv64; then echo "Gnosis network has no available client combos on RISC-V. Aborting." exit 1 fi @@ -2482,19 +2482,19 @@ query_deployment() { "node" "Ethereum node - consensus, execution and validator client" \ "rpc" "Ethereum RPC node - consensus and execution client" \ "validator" "Validator client only" 3>&1 1>&2 2>&3) - elif uname -a | grep -q aarch64 || uname -a | grep -q arm64; then + elif uname -m | grep -q aarch64 || uname -m | grep -q arm64; then __deployment=$(whiptail --notags --title "Select deployment type" --menu \ "What kind of deployment do you want to run?" 10 65 3 \ "node" "Ethereum node - consensus, execution and validator client" \ "rpc" "Ethereum RPC node - consensus and execution client" \ "rocket" "Validator client only - integrate with RocketPool" 3>&1 1>&2 2>&3) - elif uname -a | grep -q riscv; then + elif uname -m | grep -q riscv64; then __deployment=$(whiptail --notags --title "Select deployment type" --menu \ "What kind of deployment do you want to run?" 10 65 3 \ "node" "Ethereum node - consensus, execution and validator client" \ "rpc" "Ethereum RPC node - consensus and execution client" \ "rocket" "Validator client only - integrate with RocketPool" 3>&1 1>&2 2>&3) - elif uname -a | grep -q x86_64; then + elif uname -m | grep -q x86_64; then __deployment=$(whiptail --notags --title "Select deployment type" --menu \ "What kind of deployment do you want to run?" 11 65 4 \ "node" "Ethereum node - consensus, execution and validator client" \ @@ -2503,8 +2503,8 @@ query_deployment() { "ssv" "SSV node - consensus, execution and ssv-node" 3>&1 1>&2 2>&3) else echo "Eth Docker does not recognize this CPU architecture. Aborting." - echo "Output of uname -a" - uname -a + echo "Output of uname -m" + uname -m exit 1 fi echo "Your deployment choice is: ${__deployment}" @@ -2520,7 +2520,7 @@ query_validator_client() { "lodestar-vc-only.yml" "Lodestar validator client" \ "nimbus-vc-only.yml" "Nimbus validator client" 3>&1 1>&2 2>&3) elif [ "${__deployment}" = "rocket" ]; then - if uname -a | grep -q aarch64 || uname -a | grep -q arm64; then + if uname -m | grep -q aarch64 || uname -m | grep -q arm64; then CONSENSUS_CLIENT=$(whiptail --notags --title "Select validator client" --menu \ "Which validator client do you want to run?" 11 65 4 \ "lighthouse-vc-only.yml" "Lighthouse validator client" \ @@ -2535,7 +2535,7 @@ query_validator_client() { "lodestar-vc-only.yml" "Lodestar validator client" \ "nimbus-vc-only.yml" "Nimbus validator client" 3>&1 1>&2 2>&3) fi - elif uname -a | grep -q aarch64 || uname -a | grep -q arm64; then + elif uname -m | grep -q aarch64 || uname -m | grep -q arm64; then CONSENSUS_CLIENT=$(whiptail --notags --title "Select validator client" --menu \ "Which validator client do you want to run?" 11 65 4 \ "lighthouse-vc-only.yml" "Lighthouse validator client" \ @@ -2564,7 +2564,7 @@ query_consensus_client() { "teku.yml" "Teku (Java) - consensus and validator client" \ "lodestar.yml" "Lodestar (Javascript) - consensus and validator client" \ "nimbus.yml" "Nimbus (Nim) - consensus and validator client" 3>&1 1>&2 2>&3) - elif uname -a | grep -q aarch64 || uname -a | grep -q arm64; then + elif uname -m | grep -q aarch64 || uname -m | grep -q arm64; then CONSENSUS_CLIENT=$(whiptail --notags --title "Select consensus client" --menu \ "Which consensus client do you want to run?" 11 65 4 \ "nimbus.yml" "Nimbus (Nim) - consensus and validator client" \ @@ -2572,7 +2572,7 @@ query_consensus_client() { "lodestar.yml" "Lodestar (Javascript) - consensus and validator client" \ "lighthouse.yml" "Lighthouse (Rust) - consensus and validator client" \ "teku.yml" "Teku (Java) - consensus and validator client" 3>&1 1>&2 2>&3) - elif uname -a | grep -q riscv; then + elif uname -m | grep -q riscv64; then CONSENSUS_CLIENT=$(whiptail --notags --title "Select consensus client" --menu \ "Which consensus client do you want to run?" 11 65 4 \ "nimbus.yml" "Nimbus (Nim) - consensus and validator client" 3>&1 1>&2 2>&3) @@ -2599,7 +2599,7 @@ query_consensus_only_client() { "teku-cl-only.yml" "Teku (Java) - consensus client" \ "lodestar-cl-only.yml" "Lodestar (Javascript) - consensus client" \ "nimbus-cl-only.yml" "Nimbus (Nim) - consensus client" 3>&1 1>&2 2>&3) - elif uname -a | grep -q aarch64 || uname -a | grep -q arm64; then + elif uname -m | grep -q aarch64 || uname -m | grep -q arm64; then CONSENSUS_CLIENT=$(whiptail --notags --title "Select consensus client" --menu \ "Which consensus client do you want to run?" 11 65 4 \ "nimbus-cl-only.yml" "Nimbus (Nim) - consensus client" \ @@ -2607,7 +2607,7 @@ query_consensus_only_client() { "lodestar-cl-only.yml" "Lodestar (Javascript) - consensus client" \ "lighthouse-cl-only.yml" "Lighthouse (Rust) - consensus client" \ "teku-cl-only.yml" "Teku (Java) - consensus client" 3>&1 1>&2 2>&3) - elif uname -a | grep -q riscv; then + elif uname -m | grep -q riscv64; then CONSENSUS_CLIENT=$(whiptail --notags --title "Select consensus client" --menu \ "Which consensus client do you want to run?" 11 65 4 \ "nimbus-cl-only.yml" "Nimbus (Nim) - consensus client" 3>&1 1>&2 2>&3) @@ -2658,7 +2658,7 @@ again or Cancel on the next screen." 10 65 query_execution_client() { if [ "${NETWORK}" = "gnosis" ]; then - if uname -a | grep -q aarch64 || uname -a | grep -q arm64; then + if uname -m | grep -q aarch64 || uname -m | grep -q arm64; then EXECUTION_CLIENT=$(whiptail --notags --title "Select execution client" --menu \ "Which execution client do you want to run?" 9 65 2 \ "nethermind.yml" "Nethermind (.NET)" \ @@ -2670,14 +2670,14 @@ query_execution_client() { "erigon.yml" "Erigon (Go)" \ "NONE" "Custom - Distributed" 3>&1 1>&2 2>&3) fi - elif uname -a | grep -q aarch64 || uname -a | grep -q arm64; then + elif uname -m | grep -q aarch64 || uname -m | grep -q arm64; then EXECUTION_CLIENT=$(whiptail --notags --title "Select execution client" --menu \ "Which execution client do you want to run?" 11 65 4 \ "besu.yml" "Besu (Java)" \ "nethermind.yml" "Nethermind (.NET)" \ "geth.yml" "Geth (Go)" \ "NONE" "Custom - Distributed" 3>&1 1>&2 2>&3) - elif uname -a | grep -q riscv; then + elif uname -m | grep -q riscv64; then EXECUTION_CLIENT=$(whiptail --notags --title "Select execution client" --menu \ "Which execution client do you want to run?" 11 65 4 \ "geth.yml" "Geth (Go)" \ @@ -3180,11 +3180,11 @@ config() { var=NIM_DOCKERFILE set_value_in_env fi - if uname -a | grep -q riscv; then + if uname -m | grep -q riscv64; then # We are using the variable # shellcheck disable=SC2034 - NM_DOCKERFILE=Dockerfile.source - var=NM_DOCKERFILE + NIM_DOCKERFILE=Dockerfile.source + var=NIM_DOCKERFILE set_value_in_env # We are using the variable # shellcheck disable=SC2034