@@ -1,8 +1,8 @@
#!/bin/bash
# Inventory System
# Author: Carsten Schoene
-# $LastChangedDate: 2012-07-21 12:34:40 +0200 (Sat, 21 Jul 2012) $
-# $Rev: 1626 $
+# $LastChangedDate: 2012-07-22 16:26:37 +0200 (Sun, 22 Jul 2012) $
+# $Rev: 1627 $
#
# Default options (can be changed by inventory-system.conf)
DEBUG="yes"
@@ -139,10 +139,7 @@
# get system cpu type
function get_system_cpu {
- CPU=`${LSHW} -quiet -C processor | ${GREP} "version:" | ${SORT} -u | ${AWK} -F"version: " '{ print $NF}' | ${SED} -e 's@\s\+@ @g'`
- if [ "${CPU}" == "" ] || [ "`get_system_type`" == "vmware" ]; then
- CPU=`${LSHW} -quiet -C processor | ${GREP} "product:" | ${SORT} -u | ${AWK} -F"product: " '{ print $NF}' | ${SED} -e 's@\s\+@ @g'`
- fi
+ CPU=`${LSHW} -quiet -C processor | ${GREP} "product:" | ${SORT} -u | ${AWK} -F"product: " '{ print $NF}' | ${HEAD} -n1 | ${SED} -e 's@\s\+@ @g'`
debug "SYSTEM-CPU: ${CPU}"
echo ${CPU}
}
|