Fix df-ext-services.sh run under devstack

Commit 4218506367 includes
devstack neutron scripts which triggers a dependency issue
happens in df-ext-services.sh.

df-ext-services.sh which doesn't run under devstack directory cannot
locate $TOP_DIR which points to devstack directory in plugin.sh.

In this patch, we dynamically locates and updates $TOP_DIR
in df-ext-services.sh.

Change-Id: I816f8157b4c1520707f6d8664b9390a9e3fed6fb
Closes-Bug: #1525499
This commit is contained in:
Li Ma 2015-12-15 22:34:41 +08:00
parent 38d9c29d84
commit 5d1f898243
2 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,8 @@
#!/usr/bin/env bash
# Locate devstack directory
TOP_DIR=
# Detect path for this script file
DF_DIR=$(cd $(dirname "$0") && pwd)

View File

@ -128,6 +128,9 @@ function init_ovs {
function install_df {
# Obtain devstack directory for df-ext-services.sh
sed -i "/^TOP_DIR=/cTOP_DIR=$TOP_DIR" $DEST/dragonflow/devstack/df-ext-services.sh
nb_db_driver_install_server
nb_db_driver_install_client