From: John Wolfe Date: Mon, 7 Feb 2022 18:21:18 +0000 (-0800) Subject: Service Discovery script update. X-Git-Tag: stable-12.0.0~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e6db032d0ad7404b327a5126e1a62c2b91c7bb3;p=thirdparty%2Fopen-vm-tools.git Service Discovery script update. Updated the get-version.sh script to retrieve the vRLI version. --- diff --git a/open-vm-tools/services/plugins/serviceDiscovery/get-versions.sh b/open-vm-tools/services/plugins/serviceDiscovery/get-versions.sh index c46054e20..65d877aa4 100644 --- a/open-vm-tools/services/plugins/serviceDiscovery/get-versions.sh +++ b/open-vm-tools/services/plugins/serviceDiscovery/get-versions.sh @@ -95,7 +95,7 @@ get_cassandra_version() { get_vrli_version() { FILE_PATH_TEMPLATE=/storage/core/loginsight/config/loginsight-config.xml# - FILE_NAMES=($(ls /storage/core/loginsight/config/ 2>/dev/null | grep -o "[0-9].*")) + FILE_NAMES=$(ls /storage/core/loginsight/config/ 2>/dev/null | grep -o "[0-9].*") [ ! -z "$FILE_NAMES" ] && LATEST_FILE_NUM=$(printf '%s\n' "${FILE_NAMES[@]}" | awk '$1 > m || NR == 1 { m = $1 } END { print m }') VERSION_FILE_NAME="$FILE_PATH_TEMPLATE$LATEST_FILE_NUM" VERSION=$(cat $VERSION_FILE_NAME 2>/dev/null | grep 'strata-version value=' | grep -oE "[0-9.]+" | head -1)