Fix whitespaced manufacturer and bad [[

This commit is contained in:
Joshua Boniface 2021-10-11 15:08:04 -04:00
parent 8c3b5d7dab
commit 079013dfbc
1 changed files with 2 additions and 2 deletions

View File

@ -18,8 +18,8 @@ else
echo >> $TMPFILE echo >> $TMPFILE
fi fi
# Get machine information # Get machine information
MANUFACTURER="$( /usr/sbin/dmidecode | grep -A1 'Chassis Information' | tail -1 | awk -F':' '{print $2}' | tr -s ' ' )" MANUFACTURER="$( /usr/sbin/dmidecode | grep -A1 'Chassis Information' | tail -1 | awk -F':' '{print $2}' | tr -s ' ' | xargs echo -n )"
if [[ -z ${MANUFACTURER} ]]; then if [ -z "${MANUFACTURER}" ]; then
MANUFACTURER='Unknown' MANUFACTURER='Unknown'
fi fi
echo "> \033[1;37mPVC {% if is_coordinator %}coordinator{% else %}hypervisor{% endif %} node\033[0m on \033[1;31m${MANUFACTURER}\033[0m hardware" >> $TMPFILE echo "> \033[1;37mPVC {% if is_coordinator %}coordinator{% else %}hypervisor{% endif %} node\033[0m on \033[1;31m${MANUFACTURER}\033[0m hardware" >> $TMPFILE