From 01541aba74b52bede758f76ae28f8855631f43e0 Mon Sep 17 00:00:00 2001 From: yangsong Date: Wed, 7 Nov 2018 18:19:35 +0800 Subject: [PATCH] correct several issues on site.httpport in diskless provision (#5774) --- xCAT-server/lib/xcat/plugins/anaconda.pm | 5 +++-- xCAT-server/lib/xcat/plugins/debian.pm | 3 +-- xCAT/postscripts/xcatdsklspost | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 4fea40716..68011078a 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -652,8 +652,7 @@ sub mknetboot $kcmdline .= $statemnt . " "; $kcmdline .= "XCAT=$xcatmasterip:$xcatdport "; - - $kcmdline .= "XCATHTTPPORT=$httpport "; + if ($rootfstype ne "ramdisk") { @@ -695,6 +694,8 @@ sub mknetboot $kcmdline .= " nonodestatus "; } + $kcmdline .= "XCATHTTPPORT=$httpport "; + if (($::XCATSITEVALS{xcatdebugmode} eq "1") or ($::XCATSITEVALS{xcatdebugmode} eq "2")) { #for use in postscript and postbootscript in xcatdsklspost in the rootimg $kcmdline .= " LOGSERVER=$xcatmasterip "; diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index 70c2e6ddb..44b434e7f 100644 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -1336,8 +1336,6 @@ sub mknetboot } - $kcmdline .=" XCATHTTPPORT=$httpport "; - # add support for subVars in the value of "statemnt" my $statemnt = ""; if (exists($stateHash->{$node})) { @@ -1401,6 +1399,7 @@ sub mknetboot } + $kcmdline .=" XCATHTTPPORT=$httpport "; if (($::XCATSITEVALS{xcatdebugmode} eq "1") or ($::XCATSITEVALS{xcatdebugmode} eq "2")) { my ($host, $ipaddr) = xCAT::NetworkUtils->gethostnameandip($xcatmaster); diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 0a94a131a..7147d2fb7 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -487,7 +487,7 @@ else # for common mode MODE=1,2,3,5 (updatenode,moncfg,node deployment) SIP=`echo $TMP | cut -d: -f1` elif [ "$KEY" = "XCATHTTPPORT" ];then - HTTPPORT=$(echo $i | awk -F= '{print $1}') + HTTPPORT=$(echo $i | awk -F= '{print $2}') [ -z "$HTTPPORT" ] && HTTPPORT="80" fi done