machine: exclude comment line starting with '#' from dmidecode output as seen on a HP Proliant Server

This commit is contained in:
Silvan Calarco 2014-06-11 21:18:41 +02:00
parent 3a7c33f32b
commit 2e1ef68602

View File

@ -11,7 +11,7 @@ function getdmivar() {
local dmivalue
[ $1 ] || return 0
dmivalue=`/usr/sbin/dmidecode -s $1 2>/dev/null | head -n1`
dmivalue=`/usr/sbin/dmidecode -s $1 2>/dev/null | grep -v "^#" | head -n1`
echo $dmivalue
return 0
}