Merge "Revert "Fix discoverd bug when dmidecode reports GB""

This commit is contained in:
Jenkins 2016-01-17 14:26:57 +00:00 committed by Gerrit Code Review
commit e52fbdc598

View File

@ -44,7 +44,7 @@ CPU_ARCH=$(lscpu | grep Architecture | awk '{ print $2 }')
update ".cpu_arch = \"$CPU_ARCH\"" update ".cpu_arch = \"$CPU_ARCH\""
RAM=0 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 do
RAM=$(( RAM + $i )); RAM=$(( RAM + $i ));
done done