Committed by
Gerrit Code Review
updated the onos-service start script to support specification of initial
applications to active and updated the docker image from CMD to entrypoint Change-Id: I7d9d32ff4b756bc8834f7666473f3bca82812fc8 Signed-off-by: David K. Bainbridge <dbainbri@ciena.com>
Showing
2 changed files
with
30 additions
and
2 deletions
... | @@ -11,6 +11,34 @@ | ... | @@ -11,6 +11,34 @@ |
11 | #export JAVA_OPTS="${JAVA_OPTS:--DenableNettyTLS=true -Djavax.net.ssl.keyStore=/home/ubuntu/onos.jks -Djavax.net.ssl.keyStorePassword=222222 -Djavax.net.ssl.trustStore=/home/ubuntu/onos.jks -Djavax.net.ssl.trustStorePassword=222222}" | 11 | #export JAVA_OPTS="${JAVA_OPTS:--DenableNettyTLS=true -Djavax.net.ssl.keyStore=/home/ubuntu/onos.jks -Djavax.net.ssl.keyStorePassword=222222 -Djavax.net.ssl.trustStore=/home/ubuntu/onos.jks -Djavax.net.ssl.trustStorePassword=222222}" |
12 | 12 | ||
13 | ONOS_HOME=/opt/onos | 13 | ONOS_HOME=/opt/onos |
14 | +KARAF_ARGS= | ||
15 | +SYS_APPS=drivers | ||
14 | 16 | ||
15 | [ -d $ONOS_HOME ] && cd $ONOS_HOME || ONOS_HOME=$(dirname $0)/.. | 17 | [ -d $ONOS_HOME ] && cd $ONOS_HOME || ONOS_HOME=$(dirname $0)/.. |
16 | -${ONOS_HOME}/apache-karaf-$KARAF_VERSION/bin/karaf "$@" | 18 | + |
19 | +# Parse out arguments destinted for karaf invocation v. arguments that | ||
20 | +# will be processed in line | ||
21 | +while [ $# -gt 0 ]; do | ||
22 | + case $1 in | ||
23 | + apps-clean) | ||
24 | + # Deactivate all applications | ||
25 | + find ${ONOS_HOME}/apps -name "active" -exec rm \{\} \; | ||
26 | + ;; | ||
27 | + *) | ||
28 | + KARAF_ARGS+=" $1" | ||
29 | + ;; | ||
30 | + esac | ||
31 | + shift | ||
32 | +done | ||
33 | + | ||
34 | +# Activate the system required applications (SYS_APPS) as well as any | ||
35 | +# specified applications in the var ONOS_APPS | ||
36 | +for app in ${SYS_APPS//,/ } ${ONOS_APPS//,/ }; do | ||
37 | + if [[ "$app" =~ \. ]]; then | ||
38 | + touch ${ONOS_HOME}/apps/$app/active | ||
39 | + else | ||
40 | + touch ${ONOS_HOME}/apps/org.onosproject.$app/active | ||
41 | + fi | ||
42 | +done | ||
43 | + | ||
44 | +exec ${ONOS_HOME}/apache-karaf-$KARAF_VERSION/bin/karaf $KARAF_ARGS | ... | ... |
-
Please register or login to post a comment