From 5e5cc2b2ace3a5fe4b1b2394bfa5a32f4664e52b Mon Sep 17 00:00:00 2001 From: herbert Date: Tue, 18 Feb 2020 17:53:52 +0100 Subject: Fix onap-odl-neon image Add missing configuration scripts Issue-ID: SDNC-1056 Signed-off-by: herbert Change-Id: Id76f855e819baef4eef8f0770c398c86da8c76fc --- .../src/main/odlscripts/set_persistence.sh | 111 +++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100755 opendaylight/neon/neon-alpine/src/main/odlscripts/set_persistence.sh (limited to 'opendaylight/neon/neon-alpine/src/main/odlscripts/set_persistence.sh') diff --git a/opendaylight/neon/neon-alpine/src/main/odlscripts/set_persistence.sh b/opendaylight/neon/neon-alpine/src/main/odlscripts/set_persistence.sh new file mode 100755 index 00000000..15c22717 --- /dev/null +++ b/opendaylight/neon/neon-alpine/src/main/odlscripts/set_persistence.sh @@ -0,0 +1,111 @@ +#!/bin/bash +# +# Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v1.0 which accompanies this distribution, +# and is available at http://www.eclipse.org/legal/epl-v10.html +# + + +function usage() +{ + # Print any error messages + test "$1" != "" && echo " ERROR: $1" + + # Print standard usage help + cat << EOF + This script is used to enable or disable the config datastore + persistence. The default state is enabled. The user should + restart controller to apply changes. The script can be used + before starting controller for the first time. + + Usage: $0 + +EOF + + exit 1 +} + + +function end_banner +{ +cat <\(.*\)<\/version>/\1/p' ${ORIG_CONF_DIR}/maven-metadata-local.xml) + ORIG_CONF_DIR=${ORIG_CONF_DIR}/${version} + ORIG_CLUSTER_CONF=sal-clustering-config-${version}-datastore.cfg + + if [ -f ${ORIG_CONF_DIR}/${ORIG_CLUSTER_CONF} ]; then + cat <