From cbe8dd73103dde257d07a8c9922ac62d03a2774d Mon Sep 17 00:00:00 2001 From: Charles Chan Date: Tue, 27 Jun 2017 18:25:05 -0700 Subject: [PATCH] Apply config files in tools/package/config when running locally Loading config from file is discouraged in deployment. However, it is very useful when developing/testing locally. This patch will copy JSON files under tools/package/config to local ONOS directory when running 'onos-buck run onos-local' The tarball generated by 'buck build onos' will remain intact, so as the Docker image Change-Id: I047bfac39772e32e67e522dc2bea38720426c4e6 --- tools/package/onos-run-karaf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/package/onos-run-karaf b/tools/package/onos-run-karaf index 3f369a3320..b957214ae2 100755 --- a/tools/package/onos-run-karaf +++ b/tools/package/onos-run-karaf @@ -64,6 +64,9 @@ if [ ! -d $ONOS_DIR -o "$oldMD5" != "$newMD5" -o -d $ONOS_DIR -a -n "$clean" ]; } EOF + # Copy config files + find $ONOS_ROOT/tools/package/config -maxdepth 1 -name \*.json -exec cp {} $ONOS_HOME/config/ \; + else # Otherwise, run using the previous installation echo "Running previous installation..."