#!/bin/sh # based on http://www-947.ibm.com/support/entry/portal/docdisplay?brand=5000008&lndocid=MIGR-5078398 IPMITOOL_LAN="ipmitool lan set 1" IPMITOOL_USER="ipmitool user" IPMITOOL_RAW="ipmitool raw" IPMITOOL_CHANNEL="ipmitool channel" PASSWORD="somepasshere" /sbin/service ipmi start $IPMITOOL_RAW 0x30 0x13 0xff 0x0 0x0 0x0 $IPMITOOL_LAN ipsrc static $IPMITOOL_USER disable 1 $IPMITOOL_USER disable 3 $IPMITOOL_USER disable 4 $IPMITOOL_USER enable 2 $IPMITOOL_USER priv 2 4 1 $IPMITOOL_CHANNEL setaccess 1 2 callin=on ipmi=on link=off privilege=4 $IPMITOOL_USER set name 2 root $IPMITOOL_USER set password 2 $PASSWORD $IPMITOOL_USER list 1 $IPMITOOL_RAW 0x6 0x40 0x1 0x42 0x44 $IPMITOOL_RAW 0x6 0x40 0x1 0x82 0x84 $IPMITOOL_LAN arp respond on $IPMITOOL_LAN auth admin md5 $IPMITOOL_LAN cipher_privs uaaaXXXXXXXXXXX bmcip=`/sbin/ifconfig eth0 | awk '/inet addr/ {print $2}' | sed s/addr:// | awk -F. '{print $1 "." $2 "." $3+16 "." $4}'` $IPMITOOL_LAN ipaddr $bmcip $IPMITOOL_LAN netmask 255.255.240.0 $IPMITOOL_LAN defgw ipaddr 10.128.16.100 /sbin/service ipmi stop