virtualzation run.sh: launch run.base.sh from same path as run.sh
authorChris Wright <chrisw@sous-sol.org>
Wed, 22 Jan 2014 04:30:41 +0000 (20:30 -0800)
committerChris Wright <chrisw@sous-sol.org>
Wed, 22 Jan 2014 05:28:21 +0000 (21:28 -0800)
The virtualization edition's run.sh script internally hard codes
the underlying run.base.sh script to be in cwd:

  ./run.base.sh ...

Use a trick similar to the base edition's run.sh script to redirect to
the underlying [run.base.sh] script to use the same path as run.sh.

Note: A platform (like Linux) is likely to place a top-level run.sh
script in a /bin type directory and the underlying internal scripts in
an out-of-$PATH directory like /usr/libexec/.  This may need some final
update based on that, but for now brings the two editions' scripts in
line with one another.

Change-Id: Ia8d719826de02efa6a36d3427f880cf062edc547
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
distributions/virtualization/src/assemble/resources/run.sh

index aa7a21ebfeffefb923396ac05a332b3cc1614fa5..a2a49e466f66edc227070228e7f8ef8d614c41be 100755 (executable)
@@ -1,5 +1,9 @@
 #!/bin/bash
 
+# Use same path for run.base.sh
+RUNSH_DIR=$(dirname $0)
+RUN_BASE_SH=${RUNSH_DIR}/run.base.sh
+
 function usage {
     echo "Please select one of the 3 supported Virtualization technology : \"$0 -virt [ovsdb | opendove | vtn]\""
     exit 1
@@ -34,4 +38,4 @@ else
     fi
 fi
 
-./run.base.sh -bundlefilter "org.opendaylight.(${ODL_VIRT_FILTER})" "${@:1:$virtIndex-1}" "${@:virtIndex+2}"
+$RUN_BASE_SH -bundlefilter "org.opendaylight.(${ODL_VIRT_FILTER})" "${@:1:$virtIndex-1}" "${@:virtIndex+2}"