Committed by
Gerrit Code Review
[ONOS-3553] Resolve the onos-service not start issue
This commit resolves onos-service not start issue. If we have onos directory under /opt, no matter the directory is empty or not, onos-service always tries to use this path. If onos-service binary located in other path, we need to reconfigure the ONOS_HOME. Change-Id: I13f375d75e864240e6d014100fb7b69de7fd4178
Showing
1 changed file
with
9 additions
and
0 deletions
... | @@ -13,6 +13,15 @@ | ... | @@ -13,6 +13,15 @@ |
13 | ONOS_HOME=/opt/onos | 13 | ONOS_HOME=/opt/onos |
14 | KARAF_ARGS= | 14 | KARAF_ARGS= |
15 | SYS_APPS=drivers | 15 | SYS_APPS=drivers |
16 | +CURRENT_ONOS_HOME="`( cd $(dirname $0)/.. && pwd )`" | ||
17 | + | ||
18 | +# check whether executable onos binary is located under /opt/onos | ||
19 | +# if not try to reconfigure ONOS_HOME with current path | ||
20 | +if [ $CURRENT_ONOS_HOME != $ONOS_HOME ]; then | ||
21 | + ONOS_HOME=$CURRENT_ONOS_HOME | ||
22 | +fi | ||
23 | + | ||
24 | +echo $ONOS_HOME | ||
16 | 25 | ||
17 | [ -d $ONOS_HOME ] && cd $ONOS_HOME || ONOS_HOME=$(dirname $0)/.. | 26 | [ -d $ONOS_HOME ] && cd $ONOS_HOME || ONOS_HOME=$(dirname $0)/.. |
18 | 27 | ... | ... |
-
Please register or login to post a comment