#!/bin/bash
# 需要升级的带外地址列表
ips=\'
10.0.0.1
\'
ILO_URL=\'http://10.0.0.252\'
# 管理员账号
USER=\'root\'
# 管理员密码
PASS=\'root\'
firmware_update(){
expect<<EOF
set timeout 25
spawn ssh -o StrictHostKeyChecking=no $USER@$HOST
expect "assword:"
send "$PASSr"
expect "$"
send "wget $ILO_URL/bios.tar.gz -P /tmprn"
expect "$"
send "ipmcset -d upgrade -v /tmp/bios.tar.gzr"
expect "exit):"
send "0r"
expect "$"
send "wget $ILO_URL/update.tar.gz -P /tmprn"
send "ipmcset -d upgrade -v /tmp/update.tar.gzr"
expect "exit):"
send "0r"
EOF
}
for i in $ips
do
HOST=$i
firmware_update
done

 

升级文件传送门:

BMC_RH2285_2.06版本

bios.tar

 

哟?不错哎 订阅小米的RSS Feeds 回去慢慢看^_^