Merge "Add rpm packaging for openflowjava and openflowpluging to buildrpm.sh."
authorLuis Gomez <luis.gomez@ericsson.com>
Mon, 20 Jan 2014 22:57:06 +0000 (22:57 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 20 Jan 2014 22:57:06 +0000 (22:57 +0000)
packaging/rpm/run.dist.sh

index 3407033bf1febd81b932e12d9df5e1d0f438f6b1..35db923b04e3ad6e2f7250941a62504d61cbb531 100755 (executable)
@@ -1,43 +1,66 @@
 #!/bin/bash
 
+usage() {
+    echo -e "Usage:\t$0 base|virt-ovsdb|virt-vtn|virt-opendove|sp|-stop|-status|help\n"
+
+    echo -e "\tbase: base controller edition, good for simple testing"
+    echo -e "\tvirt-ovsdb: virtualization controller edition based on ovsdb"
+    echo -e "\tvirt-vtn: virtualization controller edition based on vtn
+    (not supported yet)"
+    echo -e "\tvirt-opendove: virtualization controller edition based on opendove (not supported yet)"
+    echo -e "\tsp: service provider controller edition (not supported yet)"
+    echo -e "\t-stop: stop the controller"
+    echo -e "\t-status: check if controller is currently running"
+    echo -e "\thelp: generate this help text"
+}
+
 option=$1;
 shift
 
 case "$option" in
 base)
     bundlefilter="-bundlefilter org.opendaylight.ovsdb.ovsdb.neutron"
-    /usr/share/opendaylight-controller/run.base.sh $bundlefilter "$@"
+    exec /usr/share/opendaylight-controller/run.base.sh $bundlefilter "$@"
     ;;
 
 virt-ovsdb)
     bundlefilter="-bundlefilter org.opendaylight.(vtn|opendove)"
-    /usr/share/opendaylight-controller/run.sh -virt ovsdb "$@"
+    exec /usr/share/opendaylight-controller/run.sh -virt ovsdb "$@"
     ;;
 
 virt-vtn)
     echo "$option not supported yet"
     #bundlefilter="-bundlefilter org.opendaylight.(affinity|opendove|ovsdb|controller.(arphandler|samples)"
-    #/usr/share/opendaylight-controller/run.sh -virt vtn "$@"
+    #exec /usr/share/opendaylight-controller/run.sh -virt vtn "$@"
     ;;
 
 virt-opendove)
     echo "$option not supported yet"
     #bundlefilter="-bundlefilter org.opendaylight.(ovsdb|vtn)"
-    #/usr/share/opendaylight-controller/run.sh -virt vtn "$@"
+    #exec /usr/share/opendaylight-controller/run.sh -virt opendove "$@"
     ;;
 
 sp)
     echo "$option not supported yet"
-    #/usr/share/opendaylight-controller/run.sh sp "$@"
+    #exec /usr/share/opendaylight-controller/run.sh sp "$@"
     ;;
 
 -stop)
-    /usr/share/opendaylight-controller/run.internal.sh -stop
+    exec /usr/share/opendaylight-controller/run.internal.sh -stop
     ;;
 
+-status)
+    exec /usr/share/opendaylight-controller/run.internal.sh -status
+    ;;
+
+help)
+    usage
+    exit 0
+    ;;
 *)
     echo "Invalid option: $option"
+    usage
     ;;
 esac
 
-exit 0
+exit -1