Browse Source

bootstrap-network: Actually use the first argument as the network flavour

Before these bug 30058 fixes, bootstrap-network.sh:
* Logged the first argument as the network flavour
  * default: basic (when there are no arguments)
* Passed $NETWORK_FLAVOUR to chutney as the network flavour

Now, bootstrap-network.sh:
* Uses the first argument as the network flavour
  * default: $NETWORK_FLAVOUR (when there are no arguments)
  * default: bridges+hs-v2 (when $NETWORK_FLAVOUR is not set)
    * This default is the same as test-network.sh's default
* Logs the network flavour
* Passes the network flavour to chutney

Fixes bug 30058; bugfix on commit 822b30c8 in February 2017.
teor 5 years ago
parent
commit
f6d409540a
1 changed files with 3 additions and 1 deletions
  1. 3 1
      tools/bootstrap-network.sh

+ 3 - 1
tools/bootstrap-network.sh

@@ -41,8 +41,10 @@ myname=$(basename "$0")
     { echo "$myname: missing chutney directory: $CHUTNEY_PATH"; exit 1; }
 [ -x "$CHUTNEY" ] || \
     { echo "$myname: missing chutney: $CHUTNEY"; exit 1; }
-flavour=basic; [ -n "$1" ] && { flavour=$1; shift; }
 
+# Set the variables for the chutney network flavour
+export NETWORK_FLAVOUR=${NETWORK_FLAVOUR:-"bridges+hs-v2"}
+[ -n "$1" ] && { NETWORK_FLAVOUR=$1; shift; }
 export CHUTNEY_NETWORK="$CHUTNEY_PATH/networks/$NETWORK_FLAVOUR"
 
 [ -e "$CHUTNEY_NETWORK" ] || \