Revert "Fix discoverd bug when dmidecode reports GB"

While the patch looks sane and the change worked locally,
it has broke the ironic-inspector gate. As we're close
to deprecating the DIB ramdisk in favor of IPA, I suggest
reverting it.

This reverts commit 802f14862c.

Change-Id: I0525e545cb2fe8ce184312a2f9bbe3763904f61a
Closes-Bug: #1534648
This commit is contained in:
Dmitry Tantsur 2016-01-15 16:07:58 +00:00
parent 802f14862c
commit 994e78209c

View file

@ -44,7 +44,7 @@ CPU_ARCH=$(lscpu | grep Architecture | awk '{ print $2 }')
update ".cpu_arch = \"$CPU_ARCH\""
RAM=0
for i in $(dmidecode --type memory | awk '($0~/Size/ && $2~/[0-9]/) {($3~/GB/) ? size=$2*1024 : size=$2; {print size;}}')
for i in $(dmidecode --type memory | grep Size | awk '{ print $2; }' | grep -E '[0-9]+');
do
RAM=$(( RAM + $i ));
done