net.sh: Ensure external disk link is setup before cleaning config dir (#6481)

automerge
This commit is contained in:
Trent Nelson 2019-10-21 16:38:58 -06:00 committed by Grimes
parent 6996f45d54
commit 564c14a2c6
1 changed files with 3 additions and 2 deletions

View File

@ -99,14 +99,15 @@ SOLANA_CONFIG_DIR=$SOLANA_ROOT/config
# Clear the current cluster configuration # Clear the current cluster configuration
clear_config_dir() { clear_config_dir() {
declare config_dir="$1" declare config_dir="$1"
setup_secondary_mount
( (
set -x set -x
rm -rf "${config_dir:?}/" # <-- $i might be a symlink, rm the other side of it first rm -rf "${config_dir:?}/" # <-- $i might be a symlink, rm the other side of it first
rm -rf "$config_dir" rm -rf "$config_dir"
mkdir -p "$config_dir" mkdir -p "$config_dir"
) )
setup_secondary_mount
} }
SECONDARY_DISK_MOUNT_POINT=/mnt/extra-disk SECONDARY_DISK_MOUNT_POINT=/mnt/extra-disk