update the nodelist.status to installing/netbooting via feedback from node during provision

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16683 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
immarvin 2013-06-19 07:28:32 +00:00
parent a6aab0c6d0
commit 645c602ce2

View File

@ -1331,10 +1331,44 @@ exit 0
EOF
close($inifile);
#if "nonodestatus" specified,do not update the nodestatus
system("mkdir -p /tmp/xcatinitrd.$$/tmp/");
open($inifile, ">","/tmp/xcatinitrd.$$/tmp/updateflag");
print $inifile <<EOMS;
#!/usr/bin/awk -f
BEGIN {
xcatdhost = ARGV[1]
xcatiport = ARGV[2]
ns = "/inet/tcp/0/" xcatdhost "/" xcatiport
print "xCAT_xcatd" |& ns
while(1) {
ns |& getline
if(\$0 == "ready")
print ARGV[3] |& ns
if(\$0 == "done")
break
}
close(ns)
exit 0
}
EOMS
close($inifile);
chmod(0755,"/tmp/xcatinitrd.$$/usr/share/udhcpc/default.script");
chmod(0755,"/tmp/xcatinitrd.$$/init");
chmod(0755,"/tmp/xcatinitrd.$$/bin/netstart");
chmod(0755,"/tmp/xcatinitrd.$$/tmp/updateflag");
@filestoadd=();
foreach (@ndrivers) {
if (-f "$customdir/$_") {