
Current Status: - CLI commands - API endpoints - controller process - agent process - Logging Test Plan: PASS: Build and Install ISO PASS: software-agent and software-controller services are active post unlock PASS: tox Story: 2010676 Task: 47817 Signed-off-by: Jessica Castelino <jessica.castelino@windriver.com> Change-Id: I394780ce40fee398c4eacb3aacb575a03ff93332
53 lines
929 B
Plaintext
53 lines
929 B
Plaintext
#
|
|
# Copyright (c) 2023 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
#
|
|
# This bash source file provides variables and functions that
|
|
# may be used by in-service patch scripts.
|
|
#
|
|
|
|
# Source platform.conf, for nodetype and subfunctions
|
|
. /etc/platform/platform.conf
|
|
|
|
declare PATCH_SCRIPTDIR=/run/software/software-scripts
|
|
declare PATCH_FLAGDIR=/run/software/software-flags
|
|
declare -i PATCH_STATUS_OK=0
|
|
declare -i PATCH_STATUS_FAILED=1
|
|
|
|
declare logfile=/var/log/software.log
|
|
declare NAME=$(basename $0)
|
|
|
|
function loginfo()
|
|
{
|
|
echo "`date "+%FT%T.%3N"`: $NAME: $*" >> $logfile
|
|
}
|
|
|
|
function is_controller()
|
|
{
|
|
[[ $nodetype == "controller" ]]
|
|
}
|
|
|
|
function is_worker()
|
|
{
|
|
[[ $nodetype == "worker" ]]
|
|
}
|
|
|
|
function is_storage()
|
|
{
|
|
[[ $nodetype == "storage" ]]
|
|
}
|
|
|
|
function is_cpe()
|
|
{
|
|
[[ $nodetype == "controller" && $subfunction =~ worker ]]
|
|
}
|
|
|
|
function is_locked()
|
|
{
|
|
test -f /var/run/.node_locked
|
|
}
|
|
|