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
This commit is contained in:
Charles Chan 2017-06-27 18:25:05 -07:00 committed by Charles Chan
parent 1667fbb693
commit cbe8dd7310

View File

@ -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..."