2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-01-08 17:32:30 +00:00

Merge pull request #195 from penguhyang/runcmdinstaller

correct runcmdinstaller code to return right value
This commit is contained in:
yangsong
2015-09-21 16:53:26 +08:00

View File

@@ -7,7 +7,12 @@
awk -v argc="$#" -v node="$1" -v cmd="$2" 'BEGIN {
port = 3001
action = "sh"
if( node=="-h" || argc !=2 || ! node || ! cmd){
if(node=="-h"){
print "Usage:\n\n runcmdinstaller <node> \"<command>\"\n"
print " make sure all the commands are quoted by \"\"\n";
exit 0;
}
if(argc !=2 || ! node || ! cmd){
print "Usage:\n\n runcmdinstaller <node> \"<command>\"\n"
print " make sure all the commands are quoted by \"\"\n";
exit 1;