Fix collect tool detection of active controller

When sourcing the openrc file the OS_USERNAME variable is
set on both the active and standby controller.
Make the distinction between active and standby based on
OS_PASSWORD variable which is set only on active controller.

Story: 2006536
Task: 36596
Change-Id: If9c9c171579cf41f600693505484efb3f75a511e
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
This commit is contained in:
Dan Voiculeasa 2019-09-13 05:48:46 -04:00
parent e32b790684
commit 4733477aa2
1 changed files with 2 additions and 2 deletions

View File

@ -75,9 +75,9 @@ function source_openrc_if_needed
# get local host activity state
OPENRC="/etc/platform/openrc"
if [ -e "${OPENRC}" ] ; then
OS_USERNAME=""
OS_PASSWORD=""
source ${OPENRC}
if [ "${OS_USERNAME}" != "" ] ; then
if [ "${OS_PASSWORD}" != "" ] ; then
ACTIVE=true
fi
fi