mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-31 01:56:39 +00:00
write HTTPPORT= to xcatinfo
This commit is contained in:
parent
1fb78eb97d
commit
accb6d69a9
@ -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"')
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user