diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index ffab2ab89..f67afa9c1 100644 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -889,6 +889,8 @@ sub mknetboot my $installroot; $installroot = "/install"; my $xcatdport = "3001"; + my $xcatiport = "3002"; + my $nodestatus = "y"; if ($sitetab) { @@ -902,11 +904,21 @@ sub mknetboot { $xcatdport = $ref->{value}; } + ($ref) = $sitetab->getAttribs({key => 'xcatiport'}, 'value'); + if ($ref and $ref->{value}) + { + $xcatiport = $ref->{value}; + } ($ref) = $sitetab->getAttribs({key => 'tftpdir'}, 'value'); if ($ref and $ref->{value}) { $globaltftpdir = $ref->{value}; } + ($ref) = $sitetab->getAttribs({key => 'nodestatus'}, 'value'); + if ($ref and $ref->{value}) + { + $nodestatus = $ref->{value}; + } } my %donetftp=(); my %oents = %{$ostab->getNodesAttribs(\@nodes,[qw(os arch profile provmethod)])}; @@ -1307,6 +1319,9 @@ sub mknetboot $kcmdline = "imgurl=http://$imgsrv/$rootimgdir/rootimg-statelite.gz STATEMNT="; } + if(($nodestatus eq "n") or ($nodestatus eq "N") or ($nodestatus eq "0")){ + $kcmdline .= " nonodestatus "; + } # add support for subVars in the value of "statemnt" diff --git a/xCAT-server/share/xcat/install/scripts/pre.ubuntu b/xCAT-server/share/xcat/install/scripts/pre.ubuntu index 95c95ece9..e6bcf76b9 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.ubuntu +++ b/xCAT-server/share/xcat/install/scripts/pre.ubuntu @@ -63,9 +63,18 @@ cat >/tmp/foo.sh < /dev/null && export DEBUG=1 # TODO: does "anaconda.busybox sh" support "set " ? PRINIC=$prinic +NODESTATUS='y' +XCATIPORT="3002" for i in `cat /proc/cmdline`; do KEY=`echo \$i |awk -F= '{print \$1}'` @@ -971,7 +973,17 @@ for i in `cat /proc/cmdline`; do VALUE=`echo \$i |awk -F= '{print \$2}'` # format: XCAT=xcatmaster:3001 XCATSERVER=\$VALUE + elif [ "\$KEY" == 'XCATIPORT' ]; then + VALUE=`echo \$i |awk -F= '{print \$2}'` + # format: XCAT=xcatmaster:3001 + XCATIPORT=\$VALUE fi + + #if "nonodestatus" specified,do not update the nodestatus + if [ \$i == 'nonodestatus' ]; then + NODESTATUS='n' + fi + done if [ -z "\$IFACE" ]; then @@ -998,6 +1010,16 @@ while ! ifconfig | grep 'inet addr'; do done ifconfig lo 127.0.0.1 ifconfig lo up + + +XCATMASTER=`echo \$XCATSERVER|awk -F: '{print \$1}'` + + +#update nodelist.nodestatus to "netbooting" +if [ \$NODESTATUS != 'n' ]; then + /tmp/updateflag \$XCATMASTER \$XCATIPORT "installstatus netbooting" +fi + cd / for i in `cat /proc/cmdline`; do KEY=`echo \$i |awk -F= '{print \$1}'`