2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-07-31 18:19:40 +00:00

Merge pull request #7671 from VersatusHPC/harvest/bmcsetup-robustness

fix(bmcsetup): settle after IBM port change and support long BMC passwords
This commit is contained in:
Daniel Hilst
2026-07-27 15:28:14 -03:00
committed by GitHub
+8 -2
View File
@@ -196,6 +196,7 @@ if [ "$IPMIMFG" == 2 ]; then #IBM
# Get the LAN Configuration Parameters (OEM)
CURBMCPORT=`ipmitool -d $idev raw 0xc 2 1 0xc0 0 0 | awk '{print $2}'`
done
sleep 15
let idev=idev+1
done
unset IFS
@@ -219,6 +220,7 @@ if [ "$IPMIMFG" == 2 ]; then #IBM
sleep 1
CURBMCPORT=`ipmitool -d $idev raw 0xc 2 1 0xc0 0 0 | awk '{print $2}'`
done
sleep 15
let idev=idev+1
done
unset IFS
@@ -643,8 +645,12 @@ for bmcp in $BMCPW; do
if [ "$bmcp" = "" ]; then continue; fi
TRIES=0
# Set the password for the specified user
while ! ipmitool -d $idev user set password $USERSLOT "$bmcp"; do
# Set the password for the specified user. A password longer than 16 chars
# needs the 20-byte IPMI 2.0 form; shorter ones use the default so a
# 16-byte-only BMC is not asked for a length it cannot store.
PWSIZE=""
if [ ${#bmcp} -gt 16 ]; then PWSIZE=20; fi
while ! ipmitool -d $idev user set password $USERSLOT "$bmcp" $PWSIZE; do
sleep 1
let TRIES=TRIES+1
if [ $TRIES -gt $TIMEOUT ]; then break; fi