
readconfig.sh intends to export variables to the current shell, and should be sourced using the 'source' command. It is ineffective when run as a sub-process. Fix the file permission, since the script should be sourced rather than executed. Test Plan: PASS: regression of default and madcloud examples PASS: documented usage is effective Story: 2010816 Task: 48614 Change-Id: I7e35ccf253e27b8209f8bf17dca065c58b016e14 Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
28 lines
916 B
Bash
28 lines
916 B
Bash
#!/usr/bin/env bash
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
# Copyright (c) 2023 Wind River Systems, Inc.
|
|
#
|
|
|
|
source set_defaults.sh
|
|
|
|
GET_CFG="./config.py $1"
|
|
|
|
export CONFIG_FILE="$1"
|
|
export BRIDGE_INTERFACE="$( ${GET_CFG} bridge_interface )"
|
|
export EXTERNAL_NETWORK="$( ${GET_CFG} ext_network )"
|
|
export EXTERNAL_IP="$( ${GET_CFG} ext_IP )"
|
|
export CONTROLLER="$( ${GET_CFG} controller )"
|
|
export WORKER="$( ${GET_CFG} worker )"
|
|
export STORAGE="$( ${GET_CFG} storage )"
|
|
export WORKER_NODES_NUMBER="$( ${GET_CFG} worker_nodes_num )"
|
|
export STORAGE_NODES_NUMBER="$( ${GET_CFG} storage_nodes_num )"
|
|
export DOMAIN_DIRECTORY="$( ${GET_CFG} domain_dir )"
|
|
export DEFAULT_DISK_DIR="$( ${GET_CFG} default_disk )"
|
|
export DEFAULT_CPU="$( ${GET_CFG} default_cpu )"
|
|
export DEFAULT_MEM="$( ${GET_CFG} default_mem )"
|
|
export AIO_DEFAULT_CPU="$( ${GET_CFG} aio_default_cpu )"
|
|
export AIO_DEFAULT_MEM="$( ${GET_CFG} aio_default_mem )"
|
|
|