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 @@
# karaf using the supplied arguments.
# -----------------------------------------------------------------------------
# FIXME: temporarily fix 500 error in GUI, need to be improved with a better way
if echo $* | egrep "\bclean\b"; then
. $ONOS_ROOT/tools/build/envDefaults
export KARAF_ROOT=${KARAF_ROOT:-~/Applications/apache-karaf-$KARAF_VERSION}
export STAGE=$(dirname $KARAF_ROOT)
echo "Removing data directories..."
[ -d $KARAF_ROOT ] && rm -fr $STAGE/data
fi
onos-setup-karaf && karaf "$@"
\ No newline at end of file
......