xcat-core/xCAT-genesis-scripts/bin/minixcatd.awk
2012-12-07 19:22:16 +00:00

19 lines
451 B
Awk
Executable File

#!/bin/awk -f
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
BEGIN {
port = 3001
listener = "/inet/tcp/" port "/0/0"
quit = "no"
while (match(quit,"no")) {
while (match(quit,"no") && (listener |& getline) > 0) {
if (match($0,"restart")) {
print "restarting bootstrap process" |& listener
quit="yes"
system("echo \"" $0 "\" > /restart")
close(listener)
}
}
close(listener)
}
}