Changes of Revision 91
[-] | Changed | _service:set_version:inventory-system.spec |
1
2 %define pkgname inventory-system 3 Name: inventory-system 4 Release: 0 5 -Version: 0.0.rev4265 6 +Version: 0.0.rev4297 7 Url: http://www.linux-administrator.com/ 8 License: GPLv2 9 Group: System 10 |
||
[+] | Changed | _service:recompress:tar_scm:inventory-system-0.0.rev4297.tar.bz2/client/inventory-system.sh ^ |
@@ -1,8 +1,8 @@ #!/bin/bash # Inventory System # Author: Carsten Schoene -# $LastChangedDate: 2012-11-07 20:11:02 +0100 (Wed, 07 Nov 2012) $ -# $Rev: 4265 $ +# $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 @@ -273,7 +278,7 @@ function get_system_serial { [ "`is_disabled $FUNCNAME`" == "1" ] && return case `get_system_type` in - xen-dom0|baremetal) + xen-dom0|baremetal|kvm|vmware) SYSSERIAL=`${DMIDECODE} -s system-serial-number` ;; *) @@ -401,7 +406,7 @@ function get_system_productname { [ "`is_disabled $FUNCNAME`" == "1" ] && return case `get_system_type` in - xen-dom0|baremetal) + xen-dom0|baremetal|kvm|vmware) PRODNAME=`${DMIDECODE} -s system-product-name` ;; *) @@ -416,7 +421,7 @@ function get_system_manufacturer { [ "`is_disabled $FUNCNAME`" == "1" ] && return case `get_system_type` in - xen-dom0|baremetal) + xen-dom0|baremetal|kvm|vmware) SYSMANUF=`${DMIDECODE} -s system-manufacturer` ;; *) @@ -443,7 +448,7 @@ function get_system_biosversion { [ "`is_disabled $FUNCNAME`" == "1" ] && return case `get_system_type` in - xen-dom0|baremetal) + xen-dom0|baremetal|kvm|vmware) BIOSV=`${DMIDECODE} -s bios-version` ;; *) |