Fix whitespaced manufacturer and bad [[
This commit is contained in:
parent
e65f1d15a6
commit
e009cf4076
|
@ -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