From 17ca9f2ec356376d07892664908e1dee5a453a36 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Mon, 2 Jul 2018 15:34:13 -0700 Subject: [PATCH] Correct locate rsync when running as a Snap --- multinode-demo/client.sh | 4 ++-- multinode-demo/common.sh | 2 ++ multinode-demo/drone.sh | 4 ++-- multinode-demo/validator.sh | 2 +- multinode-demo/wallet.sh | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/multinode-demo/client.sh b/multinode-demo/client.sh index 0e6e8ff739d773..d3d9ebb7f11e8c 100755 --- a/multinode-demo/client.sh +++ b/multinode-demo/client.sh @@ -15,8 +15,8 @@ rsync_leader_url=$(rsync_url "$leader") set -ex mkdir -p $SOLANA_CONFIG_DIR -rsync -vPz "$rsync_leader_url"/config/leader.json $SOLANA_CONFIG_DIR/ -rsync -vPz "$rsync_leader_url"/config-private/mint.json $SOLANA_CONFIG_DIR/ +$rsync -vPz "$rsync_leader_url"/config/leader.json $SOLANA_CONFIG_DIR/ +$rsync -vPz "$rsync_leader_url"/config-private/mint.json $SOLANA_CONFIG_DIR/ # shellcheck disable=SC2086 # $solana_client_demo should not be quoted exec $solana_client_demo \ diff --git a/multinode-demo/common.sh b/multinode-demo/common.sh index 03f97ca2a713b8..dbd0ab9ab0f349 100644 --- a/multinode-demo/common.sh +++ b/multinode-demo/common.sh @@ -3,11 +3,13 @@ # Disable complaints about unused variables in this file: # shellcheck disable=2034 +rsync=rsync if [[ -d "$SNAP" ]]; then # Running inside a Linux Snap? solana_program() { declare program="$1" printf "%s/command-%s.wrapper" "$SNAP" "$program" } + rsync="$SNAP"/bin/rsync SOLANA_CUDA="$(snapctl get enable-cuda)" elif [[ -n "$USE_SNAP" ]]; then # Use the Linux Snap binaries diff --git a/multinode-demo/drone.sh b/multinode-demo/drone.sh index d2677dd113edaf..74f7dcdfac701a 100755 --- a/multinode-demo/drone.sh +++ b/multinode-demo/drone.sh @@ -27,8 +27,8 @@ fi rsync_leader_url=$(rsync_url "$leader") set -ex mkdir -p $SOLANA_CONFIG_DIR -rsync -vPz "$rsync_leader_url"/config/leader.json $SOLANA_CONFIG_DIR/ -rsync -vPz "$rsync_leader_url"/config-private/mint.json $SOLANA_CONFIG_DIR/ +$rsync -vPz "$rsync_leader_url"/config/leader.json $SOLANA_CONFIG_DIR/ +$rsync -vPz "$rsync_leader_url"/config-private/mint.json $SOLANA_CONFIG_DIR/ # shellcheck disable=SC2086 # $solana_drone should not be quoted exec $solana_drone \ diff --git a/multinode-demo/validator.sh b/multinode-demo/validator.sh index 5735895800a4f0..2c40c03a4c1afb 100755 --- a/multinode-demo/validator.sh +++ b/multinode-demo/validator.sh @@ -68,7 +68,7 @@ rsync_leader_url=$(rsync_url "$leader") set -ex SOLANA_LEADER_CONFIG_DIR="$SOLANA_CONFIG_DIR"/leader-config rm -rf "$SOLANA_LEADER_CONFIG_DIR" -rsync -vPrz "$rsync_leader_url"/config/ "$SOLANA_LEADER_CONFIG_DIR" +$rsync -vPrz "$rsync_leader_url"/config/ "$SOLANA_LEADER_CONFIG_DIR" ls -lh "$SOLANA_LEADER_CONFIG_DIR" # shellcheck disable=SC2086 # $program should not be quoted diff --git a/multinode-demo/wallet.sh b/multinode-demo/wallet.sh index 4e737513829b39..efab71fd065e8d 100755 --- a/multinode-demo/wallet.sh +++ b/multinode-demo/wallet.sh @@ -21,7 +21,7 @@ rsync_leader_url=$(rsync_url "$leader") set -e mkdir -p $SOLANA_CONFIG_DIR if [[ ! -r $SOLANA_CONFIG_DIR/leader.json ]]; then - rsync -vPz "$rsync_leader_url"/config/leader.json $SOLANA_CONFIG_DIR/ + $rsync -vPz "$rsync_leader_url"/config/leader.json $SOLANA_CONFIG_DIR/ fi client_json=$SOLANA_CONFIG_DIR/client.json