This makes the name of the unzipped package configurable so you can run
with releases other than the default specified in lib/opendaylight.
Change-Id: Iad879c558d742da03375cb61b0c2ef141573ffec
| ... | ... |
@@ -44,6 +44,9 @@ ODL_USERNAME=${ODL_USERNAME:-admin}
|
| 44 | 44 |
# The ODL password |
| 45 | 45 |
ODL_PASSWORD=${ODL_PASSWORD:-admin}
|
| 46 | 46 |
|
| 47 |
+# Short name of ODL package |
|
| 48 |
+ODL_NAME=${ODL_NAME:-distribution-karaf-0.2.0-Helium}
|
|
| 49 |
+ |
|
| 47 | 50 |
# <define global variables here that belong to this project> |
| 48 | 51 |
ODL_DIR=$DEST/opendaylight |
| 49 | 52 |
|
| ... | ... |
@@ -87,23 +90,23 @@ function cleanup_opendaylight {
|
| 87 | 87 |
# configure_opendaylight() - Set config files, create data dirs, etc |
| 88 | 88 |
function configure_opendaylight {
|
| 89 | 89 |
# Add odl-ovsdb-openstack if it's not already there |
| 90 |
- local ODLOVSDB=$(cat $ODL_DIR/distribution-karaf-0.2.0-Helium/etc/org.apache.karaf.features.cfg | grep featuresBoot= | grep odl) |
|
| 90 |
+ local ODLOVSDB=$(cat $ODL_DIR/$ODL_NAME/etc/org.apache.karaf.features.cfg | grep featuresBoot= | grep odl) |
|
| 91 | 91 |
if [ "$ODLOVSDB" == "" ]; then |
| 92 |
- sed -i '/^featuresBoot=/ s/$/,odl-ovsdb-openstack/' $ODL_DIR/distribution-karaf-0.2.0-Helium/etc/org.apache.karaf.features.cfg |
|
| 92 |
+ sed -i '/^featuresBoot=/ s/$/,odl-ovsdb-openstack/' $ODL_DIR/$ODL_NAME/etc/org.apache.karaf.features.cfg |
|
| 93 | 93 |
fi |
| 94 | 94 |
|
| 95 | 95 |
# Configure OpenFlow 1.3 if it's not there |
| 96 |
- local OFLOW13=$(cat $ODL_DIR/distribution-karaf-0.2.0-Helium/etc/custom.properties | grep ^of.version) |
|
| 96 |
+ local OFLOW13=$(cat $ODL_DIR/$ODL_NAME/etc/custom.properties | grep ^of.version) |
|
| 97 | 97 |
if [ "$OFLOW13" == "" ]; then |
| 98 |
- echo "ovsdb.of.version=1.3" >> $ODL_DIR/distribution-karaf-0.2.0-Helium/etc/custom.properties |
|
| 98 |
+ echo "ovsdb.of.version=1.3" >> $ODL_DIR/$ODL_NAME/etc/custom.properties |
|
| 99 | 99 |
fi |
| 100 | 100 |
|
| 101 | 101 |
# Configure L3 if the user wants it |
| 102 | 102 |
if [ "${ODL_L3}" == "True" ]; then
|
| 103 | 103 |
# Configure L3 FWD if it's not there |
| 104 |
- local L3FWD=$(cat $ODL_DIR/distribution-karaf-0.2.0-Helium/etc/custom.properties | grep ^ovsdb.l3.fwd.enabled) |
|
| 104 |
+ local L3FWD=$(cat $ODL_DIR/$ODL_NAME/etc/custom.properties | grep ^ovsdb.l3.fwd.enabled) |
|
| 105 | 105 |
if [ "$L3FWD" == "" ]; then |
| 106 |
- echo "ovsdb.l3.fwd.enabled=yes" >> $ODL_DIR/distribution-karaf-0.2.0-Helium/etc/custom.properties |
|
| 106 |
+ echo "ovsdb.l3.fwd.enabled=yes" >> $ODL_DIR/$ODL_NAME/etc/custom.properties |
|
| 107 | 107 |
fi |
| 108 | 108 |
fi |
| 109 | 109 |
} |
| ... | ... |
@@ -156,7 +159,7 @@ function start_opendaylight {
|
| 156 | 156 |
# -of13: runs ODL using OpenFlow 1.3 protocol support. |
| 157 | 157 |
# -virt ovsdb: Runs ODL in "virtualization" mode with OVSDB support |
| 158 | 158 |
|
| 159 |
- run_process odl-server "cd $ODL_DIR/distribution-karaf-0.2.0-Helium && JAVA_HOME=$JHOME bin/karaf" |
|
| 159 |
+ run_process odl-server "cd $ODL_DIR/$ODL_NAME && JAVA_HOME=$JHOME bin/karaf" |
|
| 160 | 160 |
|
| 161 | 161 |
# Sleep a bit to let OpenDaylight finish starting up |
| 162 | 162 |
sleep $ODL_BOOT_WAIT |