Skip to content

Instantly share code, notes, and snippets.

@shalk
Last active December 27, 2015 15:29
Show Gist options
  • Save shalk/7348178 to your computer and use it in GitHub Desktop.
Save shalk/7348178 to your computer and use it in GitHub Desktop.
设置IPMI
#!/bin/bash
usage(){
echo " Usage :$0 10.0.50.181 10.0.50.254"
echo "Description: set ipmi ip and gateway"
exit 1
}
if [ $# == 0]
then
usage
fi
/etc/ini.d/ipmi start
ipmitool lan print 1
ipmitool lan set 1 ipsrc static
ipmitool lan set 1 ipaddress $1
ipmitool lan set 1 netmask 255.255.255.0
ipmitool lan set 1 defgw ipaddr $2
ipmitool lan print 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment