2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-21 19:22:05 +00:00

change HTTPPORT in /proc/cmdline to XCATHTTPPORT to avoid potential confilic

This commit is contained in:
yangsbj 2018-11-04 21:54:30 -05:00
parent accb6d69a9
commit 5d90a4212c
4 changed files with 16 additions and 5 deletions

View File

@ -653,7 +653,7 @@ sub mknetboot
$kcmdline .= "XCAT=$xcatmasterip:$xcatdport ";
$kcmdline .= "HTTPPORT=$httpport ";
$kcmdline .= "XCATHTTPPORT=$httpport ";
if ($rootfstype ne "ramdisk") {

View File

@ -1336,7 +1336,7 @@ sub mknetboot
}
$kcmdline .=" HTTPPORT=$httpport ";
$kcmdline .=" XCATHTTPPORT=$httpport ";
# add support for subVars in the value of "statemnt"
my $statemnt = "";

View File

@ -515,7 +515,7 @@ sub mknetboot
"imgurl=$httpmethod://$imgsrv:$httpport/$rootimgdir/$compressedrootimg ";
}
$kcmdline .= "XCAT=$xcatmaster:$xcatdport quiet ";
$kcmdline .= " HTTPPORT=$httpport ";
$kcmdline .= " XCATHTTPPORT=$httpport ";
#if site.nodestatus="n", append "nonodestatus" to kcmdline
#to inform the statelite/stateless node not to update the nodestatus during provision

View File

@ -376,13 +376,24 @@ if [ "$MODE" = "4" ]; then # for statelite mode
echo "XCATSERVER=$XCATSERVER" >> /opt/xcat/xcatinfo
fi
break
elif [ "$KEY" = "XCATHTTPPORT" ]; then
HTTPPORT=`echo $i | awk -F= '{print $2}'`
grep 'HTTPPORT' /opt/xcat/xcatinfo > /dev/null 2>&1
if [ $? -eq 0 ]; then
sed -i "s/HTTPPORT=.*/HTTPPORT=$HTTPPORT/" /opt/xcat/xcatinfo
else
echo "HTTPPORT=$HTTPPORT" >> /opt/xcat/xcatinfo
fi
break
fi
done
if [ -f /opt/xcat/xcatinfo ]; then
SIP=`grep 'XCATSERVER' /opt/xcat/xcatinfo |cut -d= -f2`
HTTPPORT=`grep 'HTTPPORT' /opt/xcat/xcatinfo |cut -d= -f2`
if [ -n "$SIP" ]; then
download_postscripts $SIP
download_postscripts $SIP:${HTTPPORT}
if [ $? -eq 0 ]; then
downloaded=1
fi
@ -469,7 +480,7 @@ else # for common mode MODE=1,2,3,5 (updatenode,moncfg,node deployment)
TMP=`echo $i | awk -F= '{print $2}'`
SIP=`echo $TMP | cut -d: -f1`
elif [ "$KEY" = "HTTPPORT" ];then
elif [ "$KEY" = "XCATHTTPPORT" ];then
HTTPPORT=$(echo $i | awk -F= '{print $1}')
[ -z "$HTTPPORT" ] && HTTPPORT="80"
fi