@@ -1,8 +1,8 @@
#!/bin/bash
# Inventory System
# Author: Carsten Schoene
-# $LastChangedDate: 2012-07-21 12:05:42 +0200 (Sat, 21 Jul 2012) $
-# $Rev: 1624 $
+# $LastChangedDate: 2012-07-21 12:16:50 +0200 (Sat, 21 Jul 2012) $
+# $Rev: 1625 $
#
# Default options (can be changed by inventory-system.conf)
DEBUG="yes"
@@ -259,10 +259,10 @@
function get_system_mgmt_mac {
case `get_system_type` in
xen-dom0|baremetal)
- ${MODPROBE} ipmi_devintf 2&>1 >/dev/null
- ${MODPROBE} ipmi_si 2&>1 >/dev/null
+ ${MODPROBE} ipmi_devintf >/dev/null 2>&1
+ ${MODPROBE} ipmi_si >/dev/null 2>&1
if [ $? == 0 ] ; then
- ${IPMITOOL} lan print 2&>1 >/dev/null
+ ${IPMITOOL} lan print 1 >/dev/null 2>&1
if [ $? == 0 ] ; then
MAC=`${IPMITOOL} lan print 1 | ${GREP} -E '(^MAC Address)' | ${AWK} '{print tolower($NF)}' | \
${GREP} -i -E '([0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2})'`
@@ -286,10 +286,10 @@
function get_system_mgmt_ip {
case `get_system_type` in
xen-dom0|baremetal)
- ${MODPROBE} ipmi_devintf 2&>1 >/dev/null
- ${MODPROBE} ipmi_si 2&>1 >/dev/null
+ ${MODPROBE} ipmi_devintf >/dev/null 2>&1
+ ${MODPROBE} ipmi_si >/dev/null 2>&1
if [ $? == 0 ] ; then
- ${IPMITOOL} lan print 1 2&>1 >/dev/null
+ ${IPMITOOL} lan print 1 >/dev/null 2>&1
if [ $? == 0 ] ; then
MGMTIP=`${IPMITOOL} lan print 1 | ${GREP} -E '(^IP Address) ' | ${AWK} '{print $NF}'`
fi
|