@@ -1,8 +1,8 @@
#!/bin/bash
# Inventory System
# Author: Carsten Schoene
-# $LastChangedDate: 2012-09-10 17:36:13 +0200 (Mon, 10 Sep 2012) $
-# $Rev: 1762 $
+# $LastChangedDate: 2012-09-10 17:52:40 +0200 (Mon, 10 Sep 2012) $
+# $Rev: 1763 $
#
# Default options (can be changed by inventory-system.conf)
DEBUG="yes"
@@ -86,7 +86,7 @@
# script usage
function usage {
- echo "Usage: $0 [--help|--uuid|--all-disk|--disks|--systemtype|--serial|--cpu|--mem|--product|--arch|--os|--kernel|--mgmtmac|--mgmtip]"
+ echo "Usage: $0 [--help|--uuid|--all-disks|--disks|--systemtype|--serial|--cpu|--mem|--product|--arch|--os|--kernel|--mgmtmac|--mgmtip]"
echo -e "\t--help\t\tShows this help"
echo -e "\t--uuid\t\tUUID of this system"
echo -e "\t--disk\t\tRoot disk size of this system"
@@ -105,7 +105,7 @@
}
RUN_FUNCTIONS=""
-args=`${GETOPT} -a -o h -l help,uuid,disk,systemtype,serial,cpu,mem,product,arch,os,kernel,mgmtmac,mgmtip -- "$@"`
+args=`${GETOPT} -a -o h -l help,uuid,disk,all-disks,systemtype,serial,cpu,mem,product,arch,os,kernel,mgmtmac,mgmtip -- "$@"`
if [ $? != 0 ] ; then
usage
fi
@@ -299,7 +299,7 @@
BL_ROOTDISK=`echo ${ROOTDEV} | ${SED} -r 's@(/dev/x?[hsv]d[a-z]).*@\1@'`
if [ -n "${HP_ROOTDISK}" ] ; then
# hp Raid
- RD=${HD_ROOTDISK}
+ RD=${HP_ROOTDISK}
elif [ -n "${MD_ROOTDISK}" ] ; then
# linux software raid
RD=${MD_ROOTDISK}
@@ -337,7 +337,7 @@
# get all (v)disks with sizes
function get_system_disk_sizes {
- DEV_SIZES=`LANG=C ${FDISK} -l 2>/dev/null | ${GREP} "^Disk /" | ${AWK} '{print $2","int($(NF-1)/1000/1000)}' | ${SED} -e 's@:,@,@' | ${GREP} -E '(/dev/x?[hsv]d[a-z],[0-9]{1,9})'`
+ DEV_SIZES=`LANG=C ${FDISK} -l 2>/dev/null | ${GREP} "^Disk /" | ${AWK} '{print $2","int($(NF-1)/1000/1000)}' | ${SED} -e 's@:,@,@' | ${GREP} -E '(/dev/cciss/c[0-9]d[0-9]|/dev/x?[hsv]d[a-z],[0-9]{1,9})'`
debug "SYSTEM-DEVS-SIZES: ${DEV_SIZES}"
echo ${DEV_SIZES}
}
|