Fix whitespaced manufacturer and bad [[

This commit is contained in:
Joshua Boniface 2023-09-01 15:42:27 -04:00
parent e65f1d15a6
commit e009cf4076
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