From 577cc842455b02461f245e1b41e662746ef4c556 Mon Sep 17 00:00:00 2001 From: Shachar Snapiri Date: Sun, 30 Dec 2018 10:55:44 +0200 Subject: [PATCH] Allow different conf source path Setting the CONF_SRC_DIR environment will take the template dragonflow.ini from that path during install. Change-Id: I57bf5aeb832e9fc68101e322691cc54cb9e20286 --- tools/run_dragonflow.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/run_dragonflow.sh b/tools/run_dragonflow.sh index 139963197..430863dce 100755 --- a/tools/run_dragonflow.sh +++ b/tools/run_dragonflow.sh @@ -1,5 +1,7 @@ #!/bin/bash +CONF_SRC_DIR=${CONF_SRC_DIR:/opt/dragonflow/etc/standalone} + VERB="" # First get all the arguments while test ${#} -gt 0; do @@ -52,7 +54,7 @@ if [ ! -d /etc/dragonflow ]; then fi # Set parameters to the ini file if [ ! -e /etc/dragonflow/dragonflow.ini ]; then - sed -e "s/LOCAL_IP/$DRAGONFLOW_IP/g" etc/standalone/dragonflow.ini | \ + sed -e "s/LOCAL_IP/$DRAGONFLOW_IP/g" ${CONF_SRC_DIR}/dragonflow.ini | \ sed -e "s/MANAGEMENT_IP/$MANAGEMENT_IP/g" | \ sed -e "s/DB_SERVER_IP/$DB_IP/g" | \ sed -e "s/NB_DB_DRIVER/$NB_DB_DRIVER/g" | \