machine: exclude comment line starting with '#' from dmidecode output as seen on a HP Proliant Server
This commit is contained in:
parent
3a7c33f32b
commit
2e1ef68602
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user