@@ -1,8 +1,8 @@
#!/bin/bash
# Inventory System
# Author: Carsten Schoene
-# $LastChangedDate: 2012-11-07 22:02:10 +0100 (Wed, 07 Nov 2012) $
-# $Rev: 4266 $
+# $LastChangedDate: 2012-11-08 13:32:55 +0100 (Thu, 08 Nov 2012) $
+# $Rev: 4297 $
#
# Default options (can be changed by inventory-system.conf)
DEBUG="yes"
@@ -86,13 +86,14 @@
# script usage
function usage {
- echo "Usage: $0 [--help|--uuid|--all-disks|--disks|--systemtype|--serial|--cpu|--mem|--product|--arch|--os|--kernel|--mgmtmac|--mgmtip|--update]"
+ echo "Usage: $0 [--help|--uuid|--all-disks|--disks|--systemtype|--serial|--ecode|--cpu|--mem|--product|--arch|--os|--kernel|--mgmtmac|--mgmtip|--update]"
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"
echo -e "\t--all-disks\tAll disk devices with size"
echo -e "\t--systemtype\tSystem image type"
echo -e "\t--serial\tSystem serial number (Service Tag)"
+ echo -e "\t--ecode\tDELL Express Service Code"
echo -e "\t--cpu\t\tCPU type"
echo -e "\t--mem\t\tAmount of memory installed in MB"
echo -e "\t--product\tSystem model"
@@ -106,7 +107,7 @@
}
RUN_FUNCTIONS=""
-args=`${GETOPT} -a -o h -l help,uuid,disk,all-disks,systemtype,serial,cpu,mem,product,arch,os,kernel,mgmtmac,mgmtip,update -- "$@"`
+args=`${GETOPT} -a -o h -l help,uuid,disk,all-disks,systemtype,serial,ecode,cpu,mem,product,arch,os,kernel,mgmtmac,mgmtip,update -- "$@"`
if [ $? != 0 ] ; then
usage
fi
@@ -137,6 +138,10 @@
RUN_FUNCTIONS="${RUN_FUNCTIONS} get_system_serial"
shift
;;
+ -e|--ecode)
+ RUN_FUNCTIONS="${RUN_FUNCTIONS} get_system_dell_express_service_code"
+ shift
+ ;;
-c|--cpu)
RUN_FUNCTIONS="${RUN_FUNCTIONS} get_system_cpu"
shift
|