diff --git a/xCAT-server/share/xcat/install/scripts/post.debian b/xCAT-server/share/xcat/install/scripts/post.debian index 83a84e413..b533faeb7 100644 --- a/xCAT-server/share/xcat/install/scripts/post.debian +++ b/xCAT-server/share/xcat/install/scripts/post.debian @@ -34,9 +34,13 @@ export MASTER_IP="#XCATVAR:XCATMASTER#" export MASTER_IPS="#XCATVAR:XCATMASTER#" export MASTER="#XCATVAR:XCATMASTER#" export INSTALLDIR=#TABLE:site:key=installdir:value# +export HTTPPORT=#TABLE:site:key=httpport:value# if [ -z "$INSTALLDIR" ]; then INSTALLDIR="/install" fi +if [ -z "$HTTPPORT" ]; then + HTTPPORT="80" +fi cd /tmp RAND=$(perl -e 'print int(rand(50)). "\n"') sleep $RAND @@ -45,7 +49,7 @@ do GOTIT=0 for i in $MASTER_IPS do - wget -l inf -N -r --waitretry=10 --random-wait --retry-connrefused -e robots=off -nH --cut-dirs=2 --reject "index.html*" --no-parent -t 0 -T 60 http://$i$INSTALLDIR/postscripts/ -P /xcatpost + wget -l inf -N -r --waitretry=10 --random-wait --retry-connrefused -e robots=off -nH --cut-dirs=2 --reject "index.html*" --no-parent -t 0 -T 60 http://${i}:${HTTPPORT}${INSTALLDIR}/postscripts/ -P /xcatpost #wget --wait=10 --random-wait --waitretry=10 --retry-connrefused -t 0 -T 60 http://$i/install/autoinst/xcatpost.tar.gz if [ "$?" = "0" ] then @@ -95,6 +99,14 @@ do else echo "XCATSERVER=$i" >> /opt/xcat/xcatinfo fi + + 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 RAND=$(perl -e 'print int(rand(5)). "\n"') diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index c6b3c7eec..fc614b805 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -79,6 +79,13 @@ else echo "INSTALLDIR=$INSTALLDIR" >> /opt/xcat/xcatinfo fi +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 + if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then msgutil_r "$MASTER_IP" "debug" "/opt/xcat/xcatinfo generated" "/var/log/xcat/xcat.log" "$log_label" fi diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 6fea01ef3..cfdbf3d68 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -696,6 +696,13 @@ if [ -n "$new_ms" ]; then else echo "XCATSERVER=$new_ms" >> /opt/xcat/xcatinfo fi + + 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 fi #save the USEFLOWCONTROL into the xcatinfo file