xcat-core/xCAT-nbroot/overlay/bin/nextdestiny.awk
jbjohnso 2c703ff14b -Modify nbroot to be able to function without xcatd= being in /proc/cmdline (still honors it)
-Eliminate a lot of output  (debug and expected error messages)
-Properly failover to all dhcpservers for getdestiny, nextdestiny, and getipmi
-Randomly vary some sleep intervals to self-segregate nodes in time to take it easy on xCATd
-Enhance x86 architecture detection to differentiate x86_64 and x86 with an x86 kernel
-Only down nics during discovery if the broadcast domains conflict


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1012 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2008-04-09 20:22:46 +00:00

24 lines
473 B
Awk
Executable File

#!/usr/bin/awk -f
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
BEGIN {
localport = ARGV[1]
ns = "/inet/tcp/0/127.0.0.1/" localport
print "<xcatrequest>" |& ns
print "<command>nextdestiny</command>" |& ns
print "</xcatrequest>" |& ns
while (1) {
if ((ns |& getline) > 0) {
print $0 > "/tmp/destiny"
if ($0 == "</xcatresponse>")
break
} else {
close(ns)
exit 1
}
}
close(ns)
exit 0
}