@@ -1,8 +1,8 @@
#!/bin/bash
# Inventory System
# Author: Carsten Schoene
-# $LastChangedDate: 2012-11-10 21:34:25 +0100 (Sat, 10 Nov 2012) $
-# $Rev: 4316 $
+# $LastChangedDate: 2013-07-16 18:42:56 +0200 (Tue, 16 Jul 2013) $
+# $Rev: 6280 $
#
# Default options (can be changed by inventory-system.conf)
DEBUG="yes"
@@ -576,7 +576,7 @@
xen-dom0|baremetal)
${MODPROBE} ipmi_devintf >/dev/null 2>&1
${MODPROBE} ipmi_si >/dev/null 2>&1
- if [ $? == 0 ] ; then
+ if [ -c /dev/ipmi0 ] ; then
${IPMITOOL} lan print 1 >/dev/null 2>&1
if [ $? == 0 ] ; then
MAC=`${IPMITOOL} lan print 1 | ${GREP} -E '(^MAC Address)' | ${AWK} '{print tolower($NF)}' | \
@@ -604,7 +604,7 @@
xen-dom0|baremetal)
${MODPROBE} ipmi_devintf >/dev/null 2>&1
${MODPROBE} ipmi_si >/dev/null 2>&1
- if [ $? == 0 ] ; then
+ if [ -c /dev/ipmi0 ] ; then
${IPMITOOL} lan print 1 >/dev/null 2>&1
if [ $? == 0 ] ; then
MGMTIP=`${IPMITOOL} lan print 1 | ${GREP} -E '(^IP Address) ' | ${AWK} '{print $NF}'`
@@ -624,6 +624,33 @@
echo ${MGMTIP}
}
+# get ipmi firmware
+function get_system_mgmt_firmware {
+ [ "`is_disabled $FUNCNAME`" == "1" ] && return
+ case `get_system_type` in
+ xen-dom0|baremetal)
+ ${MODPROBE} ipmi_devintf >/dev/null 2>&1
+ ${MODPROBE} ipmi_si >/dev/null 2>&1
+ if [ -c /dev/ipmi0 ] ; then
+ ${IPMITOOL} mc info >/dev/null 2>&1
+ if [ $? == 0 ] ; then
+ MGMTFIRM=`${IPMITOOL} mc info | ${GREP} "^Firmware Revision" | ${AWK} '{print $NF}'`
+ fi
+ if [ -z "${MGMTFIRM}" ] ; then
+ MGMTFIRM="none"
+ fi
+ else
+ MGMTFIRM="none"
+ fi
+ ;;
+ *)
+ MGMTFIRM="none"
+ ;;
+ esac
+ debug "SYSTEM-MGMT-FIRMWARE: ${MGMTFIRM}"
+ echo ${MGMTFIRM}
+}
+
# get rpm package list
function get_system_software {
[ "`is_disabled $FUNCNAME`" == "1" ] && return
@@ -700,6 +727,7 @@
get_system_hostname \
get_system_mgmt_mac \
get_system_mgmt_ip \
+ get_system_mgmt_firmware \
get_system_type \
get_system_kernelversion \
get_system_arch \
|
@@ -1,6 +1,6 @@
<?php
-$config["isdf"]["postvars"] = array("get_system_uuid","get_system_serial","get_system_cpu","get_system_memory","get_system_manufacturer","get_system_productname","get_system_biosversion","get_system_net_info","get_system_default_ip","get_system_ipv4","get_system_ipv6","get_system_hostname","get_system_mgmt_mac","get_system_mgmt_ip","get_system_type","get_system_kernelversion","get_system_arch","get_system_os","get_system_software","get_system_date","get_system_disk_size_bootdev","get_system_disk_sizes","get_system_dell_express_service_code");
+$config["isdf"]["postvars"] = array("get_system_uuid","get_system_serial","get_system_cpu","get_system_memory","get_system_manufacturer","get_system_productname","get_system_biosversion","get_system_net_info","get_system_default_ip","get_system_ipv4","get_system_ipv6","get_system_hostname","get_system_mgmt_mac","get_system_mgmt_ip","get_system_mgmt_firmware","get_system_type","get_system_kernelversion","get_system_arch","get_system_os","get_system_software","get_system_date","get_system_disk_size_bootdev","get_system_disk_sizes","get_system_dell_express_service_code");
$config["isdf"]["dhcp"]["macblacklist"] = array("00:00:00:00:00:00","ff:ff:ff:ff:ff:ff");
$config["isdf"]["dhcp"]["intblacklist"] = array("virbr0");
|