#!/bin/sh IPSRC_DEVICE=eth0 IPMITOOL_LAN="ipmitool lan set 1" IPMITOOL_USER="ipmitool user" PASSWORD="somepasshere" /sbin/service ipmi start bmcip=`/sbin/ifconfig $IPSRC_DEVICE | awk '/inet addr/ {print $2}' | sed s/addr:// | awk -F. '{print $1 "." $2 "." $3+16 "." $4}'` $IPMITOOL_LAN ipsrc static $IPMITOOL_LAN ipaddr $bmcip $IPMITOOL_LAN netmask 255.255.240.0 $IPMITOOL_LAN defgw ipaddr 10.128.16.100 $IPMITOOL_LAN access on $IPMITOOL_USER set password 2 $PASSWORD /sbin/service ipmi stop