Last active
December 27, 2015 15:29
-
-
Save shalk/7348178 to your computer and use it in GitHub Desktop.
设置IPMI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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