Fix run.sh to work from any directory. 03/4103/1
authortomas <tolvecky@cisco.com>
Thu, 9 Jan 2014 10:31:20 +0000 (11:31 +0100)
committertomas <tolvecky@cisco.com>
Thu, 9 Jan 2014 10:31:20 +0000 (11:31 +0100)
Add cd command just before executing java process to work around the issue that osgi container does not correctly start
from any folder except where run.sh is located.

Change-Id: I42562cbb88922cefe2347b8e0d293067fbd10d3d
Signed-off-by: tomas <tolvecky@cisco.com>
opendaylight/distribution/opendaylight/src/main/resources/run.sh

index 3a29f63b81a5ab0d442fae2b6e0c75003d6c2e68..ffe53afd4d5393de8e065a1708caf41893e3e726 100755 (executable)
@@ -164,6 +164,8 @@ FWCLASSPATH=${FWCLASSPATH},file:${basedir}/lib/org.eclipse.virgo.kernel.equinox.
 CLASSPATH=${CLASSPATH}:${basedir}/lib/org.eclipse.equinox.launcher-1.3.0.v20120522-1813.jar
 FWCLASSPATH=${FWCLASSPATH},file:${basedir}/lib/org.eclipse.equinox.launcher-1.3.0.v20120522-1813.jar
 
 CLASSPATH=${CLASSPATH}:${basedir}/lib/org.eclipse.equinox.launcher-1.3.0.v20120522-1813.jar
 FWCLASSPATH=${FWCLASSPATH},file:${basedir}/lib/org.eclipse.equinox.launcher-1.3.0.v20120522-1813.jar
 
+cd $basedir
+
 if [ "${stopdaemon}" -eq 1 ]; then
     if [ -e "${pidfile}" ]; then
         daemonpid=`cat "${pidfile}"`
 if [ "${stopdaemon}" -eq 1 ]; then
     if [ -e "${pidfile}" ]; then
         daemonpid=`cat "${pidfile}"`