From eb36127fdefcecf5f4e1eb59a9c1e4c944feb462 Mon Sep 17 00:00:00 2001 From: Moiz Raja Date: Wed, 19 Feb 2014 12:04:36 -0800 Subject: [PATCH] Accept agentpath as a parameter to the run script This is to be used when you want to start open daylight with say the yourkit profiling agent Usage would be something like this, ./run.sh -agentpath:"/Applications/Yourkit.app/bin/mac/agent.lib" Change-Id: I0034adab46dc5185e54dfb22c85985324f82d0fb Signed-off-by: Moiz Raja --- .../distribution/opendaylight/src/main/resources/run.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/opendaylight/distribution/opendaylight/src/main/resources/run.sh b/opendaylight/distribution/opendaylight/src/main/resources/run.sh index 90e3b03ae4..64f2c877f7 100755 --- a/opendaylight/distribution/opendaylight/src/main/resources/run.sh +++ b/opendaylight/distribution/opendaylight/src/main/resources/run.sh @@ -59,7 +59,7 @@ else fi function usage { - echo "Usage: $0 [-jmx] [-jmxport ] [-debug] [-debugsuspend] [-debugport ] [-start []] [-stop] [-status] [-console] [-help] []" + echo "Usage: $0 [-jmx] [-jmxport ] [-debug] [-debugsuspend] [-debugport ] [-start []] [-stop] [-status] [-console] [-help] [-agentpath:] []" exit 1 } @@ -83,6 +83,7 @@ statusdaemon=0 consolestart=1 dohelp=0 extraJVMOpts="" +agentPath="" unknown_option=0 while true ; do case "$1" in @@ -98,6 +99,7 @@ while true ; do -help) dohelp=1; shift;; -D*) extraJVMOpts="${extraJVMOpts} $1"; shift;; -X*) extraJVMOpts="${extraJVMOpts} $1"; shift;; + -agentpath:*) agentPath="$1"; shift;; "") break ;; *) echo "Unknown option $1"; unknown_option=1; shift ;; esac @@ -209,6 +211,7 @@ if [ "${startdaemon}" -eq 1 ]; then exit -1 fi $JAVA_HOME/bin/java ${extraJVMOpts} \ + ${agentPath} \ -Djava.io.tmpdir="${iotmpdir}/work/tmp" \ -Dosgi.install.area="${bdir}" \ -Dosgi.configuration.area="${confarea}/configuration" \ @@ -227,6 +230,7 @@ elif [ "${consolestart}" -eq 1 ]; then exit -1 fi $JAVA_HOME/bin/java ${extraJVMOpts} \ + ${agentPath} \ -Djava.io.tmpdir="${iotmpdir}/work/tmp" \ -Dosgi.install.area="${bdir}" \ -Dosgi.configuration.area="${confarea}/configuration" \ -- 2.36.6