From b32e78f0edc0479f1a3d68e11fe0fdb4b898d122 Mon Sep 17 00:00:00 2001 From: immarvin Date: Mon, 15 Jun 2015 04:53:09 -0400 Subject: [PATCH] to facilitate the installation problem debuging, add the script that can send command to installer and receive the command output --- xCAT-server/sbin/runcmdinstaller | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 xCAT-server/sbin/runcmdinstaller diff --git a/xCAT-server/sbin/runcmdinstaller b/xCAT-server/sbin/runcmdinstaller new file mode 100755 index 000000000..d4bf19509 --- /dev/null +++ b/xCAT-server/sbin/runcmdinstaller @@ -0,0 +1,30 @@ +#!/bin/awk -f +#usage: +#runcmdinstaller: issue command which run in the installer and print the command output +#runcmdinstaller "" +BEGIN { +node = ARGV[1] +#port = ARGV[2] +port = 3001 +#action = ARGV[3] +action = "sh" +cmd = ARGV[2] + +if(ARGC !=3 || ! node || ! cmd){ + print "Usage:\n\n runcmdinstaller \"\"\n" + print " make sure all the commands are quoted by \"\"\n"; + exit 1; +} + +ns = "/inet/tcp/0/" node "/" port + +#print "sh " |& ns +print action " " cmd " " |& ns + +while((ns |& getline) > 0) +print $0 + +close(ns) + +exit 0 +}