2007-10-26 22:44:33 +00:00
|
|
|
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
2008-09-18 21:12:21 +00:00
|
|
|
#
|
|
|
|
# Raw commands to set BMCs to defaults
|
|
|
|
# dx340
|
|
|
|
# 0x30 0x13 0xff 0x00 0x00 0x00
|
|
|
|
#
|
|
|
|
# dx360
|
|
|
|
# 0x30 0x02 0x43 0x4c 0x52 0xaa
|
|
|
|
# 0x08 0x00 0x49 0x4e 0x54 0x45 0x4c
|
|
|
|
# 0x08 0x04
|
|
|
|
#
|
2008-09-06 22:36:02 +00:00
|
|
|
allowcred.awk &
|
|
|
|
CREDPID=$!
|
2007-10-26 22:44:33 +00:00
|
|
|
modprobe ipmi_si
|
|
|
|
modprobe ipmi_devintf
|
2007-10-31 03:42:29 +00:00
|
|
|
while ! getipmi
|
2007-10-26 22:44:33 +00:00
|
|
|
do
|
|
|
|
echo "Retrying retrieval of IPMI settings from server"
|
|
|
|
done
|
2008-09-06 22:36:02 +00:00
|
|
|
kill $CREDPID
|
2007-10-26 22:44:33 +00:00
|
|
|
BMCIP=`grep bmcip /tmp/ipmi.data |awk -F\> '{print $2}'|awk -F\< '{print $1}'`
|
|
|
|
BMCGW=`grep gateway /tmp/ipmi.data |awk -F\> '{print $2}'|awk -F\< '{print $1}'`
|
|
|
|
BMCNM=`grep netmask /tmp/ipmi.data |awk -F\> '{print $2}'|awk -F\< '{print $1}'`
|
|
|
|
BMCUS=`grep username /tmp/ipmi.data |awk -F\> '{print $2}'|awk -F\< '{print $1}'`
|
|
|
|
BMCPW=`grep password /tmp/ipmi.data |awk -F\> '{print $2}'|awk -F\< '{print $1}'`
|
|
|
|
ipmitool lan set 1 ipsrc static
|
|
|
|
ipmitool lan set 1 ipaddr $BMCIP
|
|
|
|
ipmitool lan set 1 netmask $BMCNM
|
|
|
|
if [ ! -z "$BMCGW" ]; then
|
|
|
|
ipmitool lan set 1 defgw ipaddr $BMCGW
|
|
|
|
fi
|
|
|
|
ipmitool user disable 1
|
|
|
|
ipmitool user disable 3
|
|
|
|
ipmitool user disable 4
|
|
|
|
ipmitool user enable 2
|
|
|
|
ipmitool user priv 2 4 1
|
|
|
|
ipmitool user set name 2 $BMCUS
|
|
|
|
ipmitool user set password 2 $BMCPW
|
|
|
|
echo "Set up following user table: "
|
|
|
|
ipmitool user list 1
|
|
|
|
|
2008-01-16 01:53:29 +00:00
|
|
|
|
|
|
|
echo "Enabling Channel 1: "
|
|
|
|
ipmitool raw 0x6 0x40 0x1 0x42 0x44
|
|
|
|
ipmitool raw 0x6 0x40 0x1 0x82 0x84
|
|
|
|
|
|
|
|
echo "Enabling ARP responses: "
|
|
|
|
ipmitool lan set 1 arp respond on
|
|
|
|
|
|
|
|
echo "Enabling IPMI v 1.5 MD5 LAN access:"
|
|
|
|
ipmitool lan set 1 auth admin md5
|
|
|
|
|
|
|
|
echo "Enabling IPMI v 2.0 LAN access:"
|
2008-03-07 00:01:14 +00:00
|
|
|
ipmitool lan set 1 cipher_privs uaaaXXXXXXXXXXX
|
2008-01-16 01:53:29 +00:00
|
|
|
|
2008-03-26 20:35:07 +00:00
|
|
|
echo "Enabling SOL for channel 1"
|
|
|
|
ipmitool raw 0xc 0x21 0x1 0x1 0x1
|
|
|
|
|
2008-04-03 20:22:45 +00:00
|
|
|
echo "Enabling SOL for user 2"
|
|
|
|
ipmitool raw 6 0x4c 1 2 2 0 0 0
|
2008-01-16 01:53:29 +00:00
|
|
|
|
2008-05-21 18:03:46 +00:00
|
|
|
echo "Lighting Identify Light"
|
|
|
|
ipmitool raw 0 4 0xff
|
|
|
|
|