Jian Li
Committed by Gerrit Code Review

Purge stale staged data directory to fix 500 error in web GUI

Change-Id: I1e2c42def84e981755965d31c092b169aec10091
...@@ -4,4 +4,13 @@ ...@@ -4,4 +4,13 @@
4 # karaf using the supplied arguments. 4 # karaf using the supplied arguments.
5 # ----------------------------------------------------------------------------- 5 # -----------------------------------------------------------------------------
6 6
7 +# FIXME: temporarily fix 500 error in GUI, need to be improved with a better way
8 +if echo $* | egrep "\bclean\b"; then
9 + . $ONOS_ROOT/tools/build/envDefaults
10 + export KARAF_ROOT=${KARAF_ROOT:-~/Applications/apache-karaf-$KARAF_VERSION}
11 + export STAGE=$(dirname $KARAF_ROOT)
12 + echo "Removing data directories..."
13 + [ -d $KARAF_ROOT ] && rm -fr $STAGE/data
14 +fi
15 +
7 onos-setup-karaf && karaf "$@" 16 onos-setup-karaf && karaf "$@"
...\ No newline at end of file ...\ No newline at end of file
......