From 564c14a2c62ee57577be4a309559600121d307fe Mon Sep 17 00:00:00 2001 From: Trent Nelson Date: Mon, 21 Oct 2019 16:38:58 -0600 Subject: [PATCH] net.sh: Ensure external disk link is setup before cleaning config dir (#6481) automerge --- net/common.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/common.sh b/net/common.sh index 642c96d0f..ebb703f00 100644 --- a/net/common.sh +++ b/net/common.sh @@ -99,14 +99,15 @@ SOLANA_CONFIG_DIR=$SOLANA_ROOT/config # Clear the current cluster configuration clear_config_dir() { declare config_dir="$1" + + setup_secondary_mount + ( set -x rm -rf "${config_dir:?}/" # <-- $i might be a symlink, rm the other side of it first rm -rf "$config_dir" mkdir -p "$config_dir" ) - - setup_secondary_mount } SECONDARY_DISK_MOUNT_POINT=/mnt/extra-disk