Fix whitespaced manufacturer and bad [[
This commit is contained in:
parent
8c3b5d7dab
commit
079013dfbc
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue