From 9799ef78e64bccf428dce995d12693c366bd4cc6 Mon Sep 17 00:00:00 2001 From: immarvin Date: Tue, 25 Jun 2013 07:16:57 +0000 Subject: [PATCH] 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@16738 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- .../xcat/netboot/rh/dracut/xcat-premount.sh | 18 ++++++++++++++ .../xcat/netboot/rh/dracut/xcat-updateflag | 24 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 xCAT-server/share/xcat/netboot/rh/dracut/xcat-premount.sh create mode 100755 xCAT-server/share/xcat/netboot/rh/dracut/xcat-updateflag diff --git a/xCAT-server/share/xcat/netboot/rh/dracut/xcat-premount.sh b/xCAT-server/share/xcat/netboot/rh/dracut/xcat-premount.sh new file mode 100644 index 000000000..40c1dbbe5 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/rh/dracut/xcat-premount.sh @@ -0,0 +1,18 @@ +#!/bin/sh +#script to update nodelist.nodestatus during provision + +MASTER=`echo $XCAT |awk -F: '{print $1}'` + +getarg nonodestatus +NODESTATUS=$? + +XCATIPORT="$(getarg XCATIPORT=)" +if [ $? -ne 0 ]; then +XCATIPORT="3002" +fi + + + +if [ $NODESTATUS -ne 0 ];then +/tmp/updateflag $MASTER $XCATIPORT "installstatus netbooting" +fi diff --git a/xCAT-server/share/xcat/netboot/rh/dracut/xcat-updateflag b/xCAT-server/share/xcat/netboot/rh/dracut/xcat-updateflag new file mode 100755 index 000000000..2f9ac3165 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/rh/dracut/xcat-updateflag @@ -0,0 +1,24 @@ +#!/bin/awk -f +#script to feedback the node provision status to xcatd +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 +}